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

Reading CHECKPOINT #263

Closed
ArvinZJC opened this issue Apr 14, 2020 · 3 comments
Closed

Reading CHECKPOINT #263

ArvinZJC opened this issue Apr 14, 2020 · 3 comments

Comments

@ArvinZJC
Copy link

I saw issue #144 . However, I still get a NotFoundError(/data/user/0/com.arvinzjc.xshielder/files/chaquopy/AssetFinder/app/cnn_trainer_saver; No such file or directory) in my project.

The relevant files are:
src/main/python/code.py
src/main/python/cnn_trainer_saver/cnn_trainer.ckpt

The relevant code is:
tf.train.Saver().restore(session, os.path.join(os.path.dirname(__file__), 'cnn_trainer_saver', 'cnn_trainer.ckpt'))

@mhsmith
Copy link
Member

mhsmith commented Apr 15, 2020

Are you sure you're using this API correctly? According to the Saver documentation, the path parameter is not a complete filename but a "path prefix of the newly created checkpoint files".

@ArvinZJC
Copy link
Author

ArvinZJC commented Apr 15, 2020

More specifically, the relevant files are:
src/main/python/code.py
src/main/python/cnn_trainer_saver/cnn_trainer.ckpt.meta
src/main/python/cnn_trainer_saver/cnn_trainer.ckpt.index
src/main/python/cnn_trainer_saver/cnn_trainer.ckpt..data-00000-of-00001
src/main/python/cnn_trainer_saver/checkpoint

The exception occurred when I put these 4 checkpoint files in the folder cnn_trainer_saver. If I remove 'cnn_trainer_saver' from the code and move the files to the same directory of the PY file (i.e. src/main/python/(these checkpoint files)), then everything looks good. My question is actually why this happens. Thanks!

@mhsmith
Copy link
Member

mhsmith commented Apr 15, 2020

Unless this behaviour is different on Chaquopy than it is on other platforms, I think this is a question about TensorFlow rather than Chaquopy. I'm not an expert on TensorFlow, so you should ask on the TensorFlow GitHub page, or on StackOverflow.

@mhsmith mhsmith closed this as completed Apr 15, 2020
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