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
相同。