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

The passed save_path is not a valid checkpoint #38

Open
KPKWCE opened this issue Sep 1, 2020 · 9 comments
Open

The passed save_path is not a valid checkpoint #38

KPKWCE opened this issue Sep 1, 2020 · 9 comments

Comments

@KPKWCE
Copy link

KPKWCE commented Sep 1, 2020

Dear JaywongWang,

I am trying to execute test.py but getting the following error.

Restoring model from

ValueError Traceback (most recent call last)
in
3 tf.reset_default_graph()
4 options = default_options()
----> 5 test(options)

in test(options)
20 print('Restoring model from %s'%options['init_from'])
21 saver = tf.train.Saver()
---> 22 saver.restore(sess, options['init_from'])
23
24 word2ix = options['vocab']

/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/training/saver.py in restore(self, sess, save_path)
1280 if not checkpoint_management.checkpoint_exists_internal(checkpoint_prefix):
1281 raise ValueError("The passed save_path is not a valid checkpoint: " +
-> 1282 checkpoint_prefix)
1283
1284 logging.info("Restoring parameters from %s", checkpoint_prefix)

ValueError: The passed save_path is not a valid checkpoint:

Could you please help me on these issues?
Thanks for your time and great work!

@JaywongWang
Copy link
Owner

Sorry for the late response. What is the "init_from" you pass to ? It needs to point to the checkpoint abolute path.

@KPKWCE
Copy link
Author

KPKWCE commented Oct 14, 2020

Sorry for the late response. What is the "init_from" you pass to ? It needs to point to the checkpoint abolute path.
Dear @JaywongWang Thank you for your reply,
I think i was trying to test the model before training as no any file available in the checkpoint.
So im trying to train but for train.py getting the following error please help

with this

When I start to train the model through the script train.py, there is an OS error happened as follows:
Traceback (most recent call last):
File "train.py", line 541, in
train(options)
File "train.py", line 396, in train
all_scores, combined_score = evaluation_metric_greedy(options, data_provision, sess, proposal_inputs, caption_inputs, proposal_outputs, caption_outputs)
File "train.py", line 217, in evaluation_metric_greedy
verbose=False)
File "./densevid_eval-master/evaluator_old.py", line 61, in init
self.scorers = [(Meteor(), "METEOR")]
File "./densevid_eval-master/coco-caption/pycocoevalcap/meteor/meteor.py", line 25, in init
bufsize=0)
File "/home/strong/anaconda2/envs/tensorflow/lib/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/home/strong/anaconda2/envs/tensorflow/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I constructed an environment to implement my tensorflow. This issue has plenty of solutions online, however, they can not deal with my problem. Does someone have the same experience?

@JaywongWang
Copy link
Owner

I am not sure what caused this error. Have you checked if the following file exists: densevid_eval-master/coco-caption/pycocoevalcap/meteor/data/paraphrase-en.gz ? If NOT, please manually download it from https://github.com/tylin/coco-caption/tree/3f0fe9b819c0ea881a56441e4de1146924a394eb/pycocoevalcap/meteor/data .

@KPKWCE
Copy link
Author

KPKWCE commented Oct 14, 2020

I am not sure what caused this error. Have you checked if the following file exists: densevid_eval-master/coco-caption/pycocoevalcap/meteor/data/paraphrase-en.gz ? If NOT, please manually download it from https://github.com/tylin/coco-caption/tree/3f0fe9b819c0ea881a56441e4de1146924a394eb/pycocoevalcap/meteor/data .

Yes I have added that .gz file in the respective folder still getting error. Do I need to extract that file or as it is

@JaywongWang
Copy link
Owner

As it is.

@KPKWCE
Copy link
Author

KPKWCE commented Oct 14, 2020 via email

@JaywongWang
Copy link
Owner

I am not sure what caused this error.

@KPKWCE
Copy link
Author

KPKWCE commented Nov 18, 2020

Hello JaywongWang,

As their is not direct path given in your repository "densevid_eval-master/coco-caption/pycocoevalcap/meteor/data/"
So do we need to create data folder manually and then need to add paraphrase-en.gz file ...??
IS it correct?

Thank you for your reply

@JaywongWang
Copy link
Owner

Hello JaywongWang,

As their is not direct path given in your repository "densevid_eval-master/coco-caption/pycocoevalcap/meteor/data/"
So do we need to create data folder manually and then need to add paraphrase-en.gz file ...??
IS it correct?

Thank you for your reply

Yes.

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