openai/glow

tensorflow.python.framework.errors_impl.NotFoundError: Key Variable_4633 not found in checkpoint

Megapotatosan opened this issue · 1 comments

I'm using Tensorflow v1.10 (update : I've also tried on v1.8 and v1.13)and I've been trying to figure out how to use the pre-trained model for testing, but no matter what I do I keep getting the error

Key Variable_4633 not found in checkpoint
[[node save/RestoreV2 (defined at /home/lab/PycharmProjects/rainmodel/model.py:61) ]]
[[save/RestoreV2/_18807]]

I've used all the same setting as the pretrained model prefered according to the argv.txt in the file
I've wrote a script to check the Key in the pre-trained model and there is no Key Variable_4633

from tensorflow.python import pywrap_tensorflow
# Read data from checkpoint file
reader = pywrap_tensorflow.NewCheckpointReader("./pretrain/lsun-rnvp-twr/model_best_loss.ckpt")
var_to_shape_map = reader.get_variable_to_shape_map()
# Print tensor name and values
i = 0
for key in var_to_shape_map:
    print("tensor_name: ", key)
    i += 1
print("there are %s keys in total" % i)

Are there something need to change in the code or the pre-trained mdoel?

Hi, I meet exactly the same issue. Have you found a solution to this problem?