torch.Tensor.view_as¶
- Tensor.view_as(other) 张量¶
将此张量视为与
other相同的大小。self.view_as(other)等同于self.view(other.size())。请参阅
view()以获取更多关于view的信息。- Parameters
其他 (
torch.Tensor) – 结果张量与other具有相同的大小。
将此张量视为与 other 相同的大小。
self.view_as(other) 等同于 self.view(other.size())。
请参阅view()以获取更多关于view的信息。
其他 (torch.Tensor) – 结果张量与 other 具有相同的大小。