torch.Tensor.expand_as¶
- Tensor.expand_as(other) Tensor ¶
將此 tensor 擴展到與
other
相同的大小。self.expand_as(other)
等同於self.expand(other.size())
。有關
expand
的更多資訊,請參閱expand()
。- 參數
other (
torch.Tensor
) – 結果 tensor 的大小與other
相同。
將此 tensor 擴展到與 other
相同的大小。self.expand_as(other)
等同於 self.expand(other.size())
。
有關 expand
的更多資訊,請參閱 expand()
。
other (torch.Tensor
) – 結果 tensor 的大小與 other
相同。