Skip to content

Instantly share code, notes, and snippets.

@hzitoun
Created May 18, 2020 17:07
Show Gist options
  • Save hzitoun/5b065fb7326a1a44081ae6440e6e8618 to your computer and use it in GitHub Desktop.
Save hzitoun/5b065fb7326a1a44081ae6440e6e8618 to your computer and use it in GitHub Desktop.
Code for my medium story Serve a Deep Learning Image Classification Model Written in TensorFlow 2 as a REST API and Dockerize it! (with GPU support)
loaded_model = tf.keras.models.load_model('../models/saved_image_classifier/')
loss, acc = loaded_model.evaluate(X_test, y_test, verbose=0)
print('Accuracy: {:5.2f}%'.format(100*acc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment