捷徑

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

文件

取得 PyTorch 的完整開發人員文件

檢視文件

教學課程

取得針對初學者和進階開發人員的深入教學課程

檢視教學課程

資源

尋找開發資源並取得問題解答

檢視資源