Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save kkk324/5ca7bfda2abfdec86ca99df49d0c32b5 to your computer and use it in GitHub Desktop.

Select an option

Save kkk324/5ca7bfda2abfdec86ca99df49d0c32b5 to your computer and use it in GitHub Desktop.
model_restore_var = [v for v in tf.global_variables()]
for v in model_restore_var:
print(v.name)
print ('--------- ckpt --------')
checkpoint_dir = ckpt_path
for var_name, _ in tf.contrib.framework.list_variables(checkpoint_dir):
# Load the variable
var = tf.contrib.framework.load_variable(checkpoint_dir, var_name)
print(var_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment