Excercise-3-Question -Why do we need to change input shape

In " Try it for yourself (Lab 1)- Ungraded Lab: Improving Computer Vision Accuracy using Convolutions
and Excercise-3-Question have same data . While running lab1 on colab there was no error on input shape
where exercise -3 throws error(“expected conv2d_3_input to have 4 dimensions, but got array with shape (60000, 28, 28)”.
I cannot understand why lab-1 run with the same input shape and excercise 3 needs to be reshaped

Hello @Arvind_Garg ,

Welcome to our Community! Thanks for reaching out with your questions.We are here to help you.

We know that the lab and exercise both aim to Improve with convolutions.But, at first let us clear with this part that, if you check, there are more modifications in the approach of the exercise which is different than the lab.
The exercise is built for you to experiment with and get more insights.Like, here you will reshape, use callbacks, etc.

Next, the reason for adding a reshape is to add an extra dimension to your data of images.

And reshape like this :

images = images.reshape(60000, 28, 28, 1)

Hope this helps.

With regards,
Nilosree Sengupta