torch.Tensor.sparse_resize_and_clear_¶
-
Tensor.
sparse_resize_and_clear_
(size, sparse_dim, dense_dim) → Tensor¶ Removes all specified elements from a sparse tensor
self
and resizesself
to the desired size and the number of sparse and dense dimensions.