While running the notebook I get the error message as below:
There was a problem compiling the code from your notebook. Details: cannot reshape array of size 7840 into shape (27455,28,28,1)
It runs fine on Collab. Could you please help me submit to get the pass grade?
Please don’t hardcode the shapes when using reshape inside train_val_generators. Use np.expand_dims or get the array shape and then add 1 to the last dimension.
On a somewhat related note, for this assignment, you should use atmost 2 conv layers.
Thanks for the guidance. It helped me pass the assignment.
Also, with 2 levels of convolution I got 99% Training and Validation Accuracy.
Could you please explain how do we choose the level of Convolution Layers?
Hi, I had the same problem and when I made the change you suggested I am getting this error in the following (grader) cell: “maximum supported dimension for an ndarray is 32, found 27455”
Also, I tried the below trying to debug:
When I use: np.expand_dims(…) → I get: (27455, 28, 28, 1)
When I use: np.reshape(…xx…,(27455, 28, 28,1)) → it works as expected
But when I do: np.reshape(…xx…,np.expand_dims(…)) → I get the same error as above