Doubt in Minist dataset

Sir

Sir why we always do X_TRAIN.reshape(28,28)

I not able to get the reason behind this.

Thanks in advance for help :slight_smile:

Hey @Royal_Yashasvi, we do this step to just reshape our data from (m,784) shape to (m,28,28) shape (m here are the number of training examples). Basically to plot our image or to feed our image to the model, we want it to be 2 - Dimensional. So 784 is the square of 28, and hence from 1-D image of shape (1,784), we convert it into (1,28,28) …a 2-dimensional square image.

If you still feel it’s not clear do revert back to me !
I hope I was able to clear your doubt ! :+1:
Happy Learning :slightly_smiling_face:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.