Last answered:

11 May 2020

Posted on:

09 May 2020

0

How to test real data on the model

I have successfully built a ML model for MNIST digit dataset which is giving an accuracy around 98%. In the lectures the dataset(both testing and training) was given by MNIST. Now I have created a 28X28 pixel image with a digit written on it and I want to test it on the model. How can I do that ? I read some articles online on how to save and load model using Keras but I was unable to find such suitable methods using TensorFlow. Is there such model for TensorFlow as well ?
1 answers ( 0 marked as helpful)
Instructor
Posted on:

11 May 2020

0
Hey Adit, To do that with the MNIST is not so simple. That's because the database itself is very well cleaned and preprocessed (the reason why it is so good for learning purposes). If you want to use this MNIST model, you must preprocess your image in the same way as the data provider and then feed it. For instance, I don't know on the top of my head how they preprocessed the data, so that code must be found on GitHub or TF website. By the way, if you really want to do it with the MNIST, you can check out this article: https://medium.com/@o.kroeger/tensorflow-mnist-and-your-own-handwritten-digits-4d1cd32bbab4 The author wrote down 4 digits, then took a photo of them, preprocessed the data and then fed it. The applicable parts of the article for you are from 'Preprocessing' onwards! *** It will be much simpler and useful for you to complete the business case (in part because we build our own data provider, so we know how the data is preprocessed). After it we make a note on this and there are many discussion in the Q&A with code on how to go about it. Best,
Iliya

Submit an answer