Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Unable to open file (unable to open file: name = 'model-0.29.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) #13

Open
laurasels opened this issue Feb 19, 2019 · 2 comments

Comments

@laurasels
Copy link

Hi,

I've run the test.py script, but I got an error:

Unable to open file (unable to open file: name = 'model-0.29.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

I looked into my directory, but there isn't a file named like that. But I do have the files: 'model-0.44.h5' till 'model-0.51.h5'. Even when I changed the 'model-0.29.h5' into 'model-0.44.h5' in WEIGHTS_FILE in test.py and run again, it isn't working. Why this isn't working and how can I fix this? Should I have the file 'model-0.29.h5' into my directory? Should I change: save_best_only=TRUE into FALSE in the train.py script?

image

@lars76
Copy link
Owner

lars76 commented Feb 19, 2019

Hi,

if you change the constant WEIGHTS_FILE to a file that exists, it will work. Neural networks don't produce exactly the same results in each run. This is why, you don't have model-0.29.

Furthermore, I think you aren't running python from the correct folder. From the project folder, run python3 example_2/train.py then change WEIGHTS_FILE in example_2/test.py, then run python3 example_2/test.py. Alternatively, change WEIGHTS_FILE and IMAGES to the exact location (e.g. /home/XX/....h5).

I hope this helps.

@laurasels
Copy link
Author

Hi Lars,

Thanks for your reply, now it works!

Laura

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

No branches or pull requests

2 participants