Shortcuts

torch.Tensor.narrow_copy

Tensor.narrow_copy(dimension, start, length)Tensor

Same as Tensor.narrow() except returning a copy rather than shared storage. This is primarily for sparse tensors, which do not have a shared-storage narrow method. Calling narrow_copy with dimemsion > self.sparse_dim() will return a copy with the relevant dense dimension narrowed, and self.shape updated accordingly.

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