Reputation: 33
how can I shape this to 4D in python-3.x
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-41-3ebb07a7b8c5> in <module>
----> 1 x_train = x_train.reshape((n_samples_train, 22, 1000, 1))
2 x_test = x_test.reshape((n_samples_test, 22, 1000, 1))
3
4 print(x_train.shape)
5 print(x_test.shape)
ValueError: cannot reshape array of size 662250 into shape (883,22,1000,1)
Upvotes: 0
Views: 82
Reputation: 15043
883x22x1000x1 = 18.326.000
, which of course is different from 662.250
. Ensure you reshape in a correct format.
Upvotes: 1