Beginner Basic Question

I am new to coding, although I have fundamental understanding of neural networks. I am trying to do the basic task: train a model using the dataset mnist, take a picture of a written number with my phone, and use the model to make the prediction using this one instance. Does anyone know where to find a tutor, to teach some of these basic things? Thank you.

Hi @UltimateCoder, If you see the shape of the mnist dataset it will be (28,28,1) which is a dataset of gray scaled images. If you want to make predictions from images taken with your phone by default those images will be color images with shape (Image_height,Image_width, 3) as your model was trained on gray scaled images for making predictions you have to use same type of images i.e. you have to convert the images taken with your phone to gray scaled image. For example

gray_scaled_image = tf.image.rgb_to_grayscale(colour_images)

Now if you want to make predictions on a single image. You have to add a batch_dimension to it.

predict_image = tf.expand_dims(gray_scaled_image, axis=0)

Then you can make predictions by using model.predict. Thank You.