CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

Reshape sparse tensor not implemented on CPU

Open jsundh opened this issue 8 years ago • 0 comments

Reshaping a sparse tensor does not seem to be implemented on CPU. The following code works on a GPU, but raises a RuntimeError on CPU:

import cntk as C
import numpy as np
from scipy.sparse import csr_matrix

i = C.input_variable(100, is_sparse=True)
r = C.reshape(i, (20, 5))

data = csr_matrix(([1.0], ([0], [3])), shape=(1, 100), dtype=np.float32)

r(data)
# RuntimeError: Inside File: Source/Math/Matrix.cpp  Line: 1890  Function: Reshape  -> Feature Not Implemented

Would this be possible to implement?

jsundh avatar Dec 12 '17 10:12 jsundh