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