torch.Tensor.expand_as
- Tensor.expand_as(other) → Tensor
-
将此张量的大小扩展为与
other
相同。self.expand_as(other)
等同于self.expand(other.size())
。关于
expand
的更多详情,请参见expand()
。- 参数
-
other (
torch.Tensor
) – 结果张量与other
的大小相同。
将此张量的大小扩展为与other
相同。 self.expand_as(other)
等同于self.expand(other.size())
。
关于expand
的更多详情,请参见expand()
。
other (torch.Tensor
) – 结果张量与 other
的大小相同。