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

failed to load pretrained weights #71

Open
YJLCV opened this issue Aug 11, 2021 · 1 comment
Open

failed to load pretrained weights #71

YJLCV opened this issue Aug 11, 2021 · 1 comment

Comments

@YJLCV
Copy link

YJLCV commented Aug 11, 2021

failed to load pretrained weights
here is the error:
Traceback (most recent call last):
File "/home/lvhao/MADNet/Stereo_Online_Adaptation.py", line 324, in
main(args)
File "/home/lvhao/MADNet/Stereo_Online_Adaptation.py", line 150, in main
var_to_restore = weights_utils.get_var_to_restore_list(args.weights, [])
File "/home/lvhao/MADNet/Data_utils/weights_utils.py", line 27, in get_var_to_restore_list
reader = tf.train.NewCheckpointReader(ckpt_path)
File "/home/lvhao/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 636, in NewCheckpointReader
return CheckpointReader(compat.as_bytes(filepattern))
File "/home/lvhao/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 648, in init
this = _pywrap_tensorflow_internal.new_CheckpointReader(filename)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Unsuccessful TensorSliceReader constructor: Failed to get matching files on /home/lvhao/MADNet/MADNet/synthetic/weights.ckpt: Not found: /home/lvhao/MADNet/MADNet/synthetic; No such file or directory

Process finished with exit code 1

the directory "/home/lvhao/MADNet/MADNet/synthetic" is existed. and have "weights.ckpt.data-00000-of-00001" "weights.ckpt.index" "weights.ckpt.meta" downloaded from your link.
how to solve it? thanks

@AlessioTonioni
Copy link
Member

Double check the paths and your file system, in this case tf does not find the file with the weights.

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