torch.Tensor.coalesce¶
- Tensor.coalesce() Tensor ¶
如果
self
是一個 未合併張量 (uncoalesced tensor),則回傳self
的一個合併副本 (coalesced copy)。如果
self
是一個已合併張量 (coalesced tensor),則回傳self
。警告
如果
self
不是一個稀疏 COO 張量,則會拋出錯誤。
如果 self
是一個 未合併張量 (uncoalesced tensor),則回傳 self
的一個合併副本 (coalesced copy)。
如果 self
是一個已合併張量 (coalesced tensor),則回傳 self
。
警告
如果 self
不是一個稀疏 COO 張量,則會拋出錯誤。