cs230-stanford / cs230-code-examples

Code examples in pyTorch and Tensorflow for CS230
Other
3.79k stars 984 forks source link

Added example for prediction #11

Open pehpa opened 6 years ago

pehpa commented 6 years ago

Hello,

I just added an example to the cs230 code for simple prediction of a set of images. For this, I added the following files according to the train/training and evaluate/evaluation split:

tensorflow/vision/predict.py
tensorflow/vision/prediction.py 

Additionally, I had to change the input_fn and model_fn functions to work not only for TRAIN and EVAL but also for the PREDICT case.

I think this change is quite helpful since I myself have searched a lot for examples on how to do the prediction with a saved TensorFlow model.

Best regards, Alex