reshape#
- iskra.sparse.reshape(x: SparseTensor, *shape: int) SparseTensor[SOURCE]#
Returns a sparse COO tensor with the same data, but with the specified shape.
- Warns:
Unlike PyTorch’s default reshape, we do not support \(-1\) as one of the
dimensions.
- Parameters:
x (
SparseTensor) – Tensor to be reshaped.*shape (int) – The new shape.
- Returns:
(
SparseTensor) – Reshaped tensor.