How to use this trained model?

Hello, i am very new to tensor flow and I’d like to do, what i think, is pretty simple.

I have followed this [tutorial] (docs/site/en/r1/tutorials/sequences/recurrent_quickdraw.md at master · tensorflow/docs · GitHub) to train a model with a google data set of drawings. I’ve had no problem following the tutorial, and i believe the model is trained and saved.

Now that my model is trained, i’d like to use it to predict my own drawings. The problem is I can’t figure out how to use this code and this model to predict my own drawings. I have found a method that is : tf.estimator.Estimator.predict() that ask for “input_fn” as argument but I don’t understand what should be input_fn.

Anyway, if some of you have already use it or have an idea of how to use this sample code from this github repo to predict my own drawing?

Thanks

Hi @protiera, As tf.estimator was deprecated in the last tesorflow version you can consider using tf.keras.Model instead. Generally, for predicting your own images you have to convert an image to a numpy array and add a batch dimension to the numpy array and pass the array to the model.predict( ). Thank You.

1 Like