torch.sparse.as_sparse_gradcheck
- torch.sparse.as_sparse_gradcheck(gradcheck)
Decorate function, to extend gradcheck for sparse tensors.
Decorator for torch.autograd.gradcheck or its functools.partial variants that extends the gradcheck function with support to input functions that operate on or/and return sparse tensors.
The specified gradcheck function itself is guaranteed to operate on strided tensors only.
For example:
>>> warnings.filterwarnings