torch.Tensor.view_as¶
- Tensor.view_as(other) Tensor¶
将此张量视为与
other相同的大小。self.view_as(other)等效于self.view(other.size())。有关
view的更多信息,请参见view()。- 参数
other (
torch.Tensor) – 结果张量的大小与other相同。
将此张量视为与 other 相同的大小。 self.view_as(other) 等效于 self.view(other.size())。
有关 view 的更多信息,请参见 view()。
other (torch.Tensor) – 结果张量的大小与 other 相同。