0
python predict.py /path/to/image checkpoint 

what is the path to image here. i need to give an image as an input, the image is in a folder 1 which is in folder test, which is in the folder flowers. so i have written it as /flowers/test/1/image.jpg, but i am getting it as "no file or directory"

enter image description here

enter image description here

i have tried writing the statements in the image, as i said thats not working. i am doing a udacity nanodegree project AI programming with python.

1
  • A path starting with / is an absolute path. You need to write flowers/test/1/image.jpg without the leading slash. Commented Nov 25, 2022 at 19:35

1 Answer 1

2

Unless the flower/ directory is at the root of the file system, you shouldn't have a leading slash in front of the path. To reference the current directory, you should instead do python predict.py ./flowers/test/1/image.jpg checkpoint.

Sign up to request clarification or add additional context in comments.

5 Comments

i got the output as invalid load key
@PriyaP what is the entire error message?
unpickling error '{' . invalid load key
pickle.UnpicklingError: invalid load key, '{'.
@PriyaP that sounds like a problem somewhere else, unrelated to passing the correct image path. I suggest you make a new question and include the relevant details.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.