Created
April 1, 2020 16:44
-
-
Save jamescalam/96d96ab2a28fde6e562a6296df150ac9 to your computer and use it in GitHub Desktop.
Snippet showing how to load a model from saved weights. We load with batch size of 1 ready for text generation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model = build_model(len(vocab), EMBED_DIM, UNITS, 1) | |
model.load_weights(tf.train.latest_checkpoint('./training_checkpoints') | |
model.build(tf.TensorShape([1, None])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment