MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / to_coo_tensor

Method to_coo_tensor

deepspeed/runtime/sparse_tensor.py:32–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 self.dense_size = None
31
32 def to_coo_tensor(self):
33 return torch.sparse_coo_tensor(self.indices.unsqueeze(0), self.values, self.dense_size)
34
35 @staticmethod
36 def type():

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected