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