On this page
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
selfand resizesselfto the desired size and the number of sparse and dense dimensions.
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.Tensor.sparse_resize_and_clear_.html