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