Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Megapotatosan opened this issue Apr 29, 2019 · 1 comment

Comments

@Megapotatosan
Copy link

Megapotatosan commented Apr 29, 2019

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?

@xwanaf
Copy link

xwanaf commented Apr 9, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants