快捷方式

torch.Tensor.expand_as

Tensor.expand_as(other) Tensor

將此張量擴充套件到與 other 相同的大小。self.expand_as(other) 等效於 self.expand(other.size())

有關 expand 的更多資訊,請參閱 expand()

引數

other (torch.Tensor) – 結果張量的大小與 other 相同。

文件

查閱 PyTorch 的全面開發者文件

檢視文件

教程

獲取面向初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源