torch.Tensor.view_as¶
- Tensor.view_as(other) Tensor ¶
将此 tensor 查看为与
other
大小相同。self.view_as(other)
等效于self.view(other.size())
。请参阅
view()
获取更多关于view
的信息。- 参数
other (
torch.Tensor
) – 结果 tensor 的大小与other
相同。
将此 tensor 查看为与 other
大小相同。self.view_as(other)
等效于 self.view(other.size())
。
请参阅 view()
获取更多关于 view
的信息。
other (torch.Tensor
) – 结果 tensor 的大小与 other
相同。