Rate this Page

torch.Tensor.dense_dim#

Tensor.dense_dim()int#

Return the number of dense dimensions in asparse tensorself.

Note

Returnslen(self.shape) ifself is not a sparse tensor.

See alsoTensor.sparse_dim() andhybrid tensors.