Skip to content

Instantly share code, notes, and snippets.

@Cospel
Created February 23, 2020 10:27
Show Gist options
  • Save Cospel/5d1b6cd4eef507a413b285733d85602b to your computer and use it in GitHub Desktop.
Save Cospel/5d1b6cd4eef507a413b285733d85602b to your computer and use it in GitHub Desktop.
load_layer.py
tf.keras.models.save_model(model, "model")
model_sm = tf.keras.models.load_model("model")
tf.keras.models.save_model(model, "model.h5")
model_h5 = tf.keras.models.load_model("model.h5", custom_objects={"PreprocessTFLayer": PreprocessTFLayer})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment