Hi, how do I fix this error?
can I know which part of the course assignment is this?
Please select the appropriate specialisation, course, week and assignment name so that you can prompt reply from the respective course mentor
Please change the course selection, it is TensorFlow Developer Professional Certificate Course 2 Convolutional Neural Network Week 1 Assignment.
your code line for source directory is incorrect, use the hint in the cell and above the cell to get the code.
Try solving it again. If you are not getting share your notebook in direct message inbox as we are not suppose to post code of graded cell here.
please do not send multiple inbox message, once you have sent, follow the same message to send further message.
I checked your notebook, yours’ root directory code lines are incorrect, and that is why in the error it shows there is no such file or directory.
you don’t need to define train dir and root directory separately. there is a hint mentioned there below the start code here.
HINT:
Use os.makedirs to create your directories with intermediate subdirectories
Don’t hardcode the paths. Use os.path.join to append the new directories to the root_path parameter
so you hardcode the root path.
THIS IS THE FIRST CODE LINE
os.makedirs(root_path)
THE NEXT CODE LINE SHOULD MAKE DIRECTORY WHICH MENTIONS THE DIRECTORY, AND THE PATH (os.path.join) which again joins to the root path and the file you want to create, i.e training, validation, training/cats, etc.
I have given you indirect hints to write the correct code.
this is just before your split data graded cell.
your split data graded cell code is also incorrect
use these hints
Hints:
os.listdir(DIRECTORY)
returns a list with the contents of that directory.os.path.getsize(PATH)
returns the size of the filecopyfile(source, destination)
copies a file from source to destinationrandom.sample(list, len(list))
shuffles a list
if you still do not get, let us know.
P.S if you search properly here, all these errors are already encountered by others and answer previously by mentors. go through those post, it will help you solve those errors. For eg, you have a split data error, then in search column type split_data tf1, course 2 week 1, you will get all the people who have encountered the error.
Regards
DP