Skip to content

Instantly share code, notes, and snippets.

@hadifar
Created December 2, 2018 21:03
Show Gist options
  • Select an option

  • Save hadifar/2bcee7185b7dd3defdf43d4b9832f15a to your computer and use it in GitHub Desktop.

Select an option

Save hadifar/2bcee7185b7dd3defdf43d4b9832f15a to your computer and use it in GitHub Desktop.
model = MyModel()
checkpoint = tf.train.Checkpoint(myModel=model)
checkpoint.save('./test/model.ckpt')
del model
model = MyModel()
checkpoint = tf.train.Checkpoint(myModel=model)
checkpoint.restore(tf.train.latest_checkpoint('./test/'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment