MNIST basemodel for 3 and 8

Sorry for being bit delay with the lesson timeline.
I created a MNIST basemodel for 3 and 8 and got ~89% accuracy.
I used the main MNIST dataset.

There’s nothing unexpected about that. But when I looked at images, they are not black and white. See:

Could you someone explain me why is that?
Thanks.

1 Like

I think it is normal when you plot a 2D image, I always see it with plt.imshow 2d image. You can, firstly, check the dimension of your data (Which I think is 2). Secondly, convert it to 3d img with np.stack((your-img)x3times), or you can check if there is a gray colormap for it. But this is just for visualizing the image, you can ignore it if what you concentrate is the model,

Hope that helps

1 Like

add this line:

matplotlib.rc('image', cmap='Greys')
1 Like

Oh yes. Thanks a lot. That was the issue.
I missed that.

1 Like

Thanks for the explanation.