How to list all variables in Tensorflow checkpoint file?
How can I get all variables from a Tensorflow checkpoint file? I'm using TF1 and can't restore the checkpoint for the already built model.
How can I get all variables from a Tensorflow checkpoint file? I'm using TF1 and can't restore the checkpoint for the already built model.
It's just as simple as this is
import tensorflow as tf
variables = tf.train.list_variables([checkpoint_path])
print(variables_in_checkpoint)
It will return a list of tuples (name, shape).
There is also another way you can get the variables of a checkpoint file by using native built-in functions of TensorFlow checkpoint utils.