Shortcuts

torch.Tensor.indices

Tensor.indices() → Tensor

Return the indices tensor of a sparse COO tensor.

Warning

Throws an error if self is not a sparse COO tensor.

See also Tensor.values().

Note

This method can only be called on a coalesced sparse tensor. See Tensor.coalesce() for details.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources