Skip to content

Instantly share code, notes, and snippets.

@WillKoehrsen
Last active February 15, 2019 23:50
Show Gist options
  • Save WillKoehrsen/65b026b0f56b13808077223d0b3aae68 to your computer and use it in GitHub Desktop.
Save WillKoehrsen/65b026b0f56b13808077223d0b3aae68 to your computer and use it in GitHub Desktop.
from keras.models import load_model
import tensorflow as tf
def load_keras_model():
"""Load in the pre-trained model"""
global model
model = load_model('../models/train-embeddings-rnn.h5')
# Required for model to work
global graph
graph = tf.get_default_graph()
load_keras_model()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment