torch.Tensor.coalesce Tensor.coalesce() → Tensor 如果 self 是一个未合并张量,则返回 self 的合并版本。 如果 self 是一个合并的张量,则返回 self。 警告 如果 self 不是稀疏 COO 张量,则抛出错误。