Skip to content

Instantly share code, notes, and snippets.

@eileen-code4fun
Last active May 27, 2021 01:21
Show Gist options
  • Save eileen-code4fun/570e9f8ef50b82b526d53673afd750ea to your computer and use it in GitHub Desktop.
Save eileen-code4fun/570e9f8ef50b82b526d53673afd750ea to your computer and use it in GitHub Desktop.
CIFAR10 Eval
cloud_model = tf.keras.models.load_model(GCS_PATH_FOR_SAVED_MODEL)
# Compile the model to make sure it uses the correct accuracy metric.
cloud_model.compile(optimizer='adam', loss=tf.keras.losses.SparseCategoricalCrossentropy(), metrics=['accuracy'])
cloud_model.evaluate(test_dataset, verbose=2)
# Output loss: 0.917 - accuracy: 0.6620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment