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. Callingnarrow_copywithdimemsion > self.sparse_dim()will return a copy with the relevant dense dimension narrowed, andself.shapeupdated accordingly.