The number of images is 107121 which are divided into test and train.
X_train = 85696
In this, I have to just add depth to the image so that further it can go to the CNN model but during reshaping,
X_train = X_train.reshape(X_train.shape[0], 1,256, 256)
I am getting this error:
cannot reshape an array of size 85696 into shape (85696,1,256,256)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
X_train = X_train.reshape(X_train.shape[0], 1,img_rows, img_cols)
reshape
cannot change the total number of elements. What's the shape ofX_train
and what's itsdtype
. – hpaulj