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