This indicates you have recalled the directory path incorrectly. go to back to first grader cell. Use search tool, you can refer the below comment, it will help you understand on how to write the codes for directory cell as well as split data
Let me know if you are unable to understand anything.
No your source directory path is incorrectly recalled. read the instructions in the comments. Use search tool in the discourse community where learners have faced similar issue and a response has been given. that way you will learn more.
there is error in the splitting of data also but the first main error is how you have recalled your directory path, so it is giving source dir error.
create_train_val_dirs is used for setting up the folder structure.
split_data is responsible ONLY for copying the images in SOURCE_DIR into TRAINING_DIR and VALIDATION_DIR.
os.remove will raise OSError if you attempt to remove a directory. Consider using os.rmdir or shutil.rmtree for removing directories (not required in this step of the assignment).
The staff have provided support code to run split_data multiple times (see this comment: # Empty directories in case you run this cell multiple times ). You don’t need to worry about cleaning the destination directories before splitting files.
Om my previous comment has clear instructions on how to write the source _dir.
If you read that comments point by point, you would be able to do the corrections.
As far as improving python skills, I can tell you I myself I am still learning as I am not from programming background, so doing a course plus working on many self learning project from kaggle or your local jupyter notebook will surely help you improve. You could also take guidance from @rmwkwok who has a shared a journey of learning by himself through research and improving day by day.
Python course will surely help you but the more you practice, more you get better.
You can send your notebook if you are still stuck.
Indeed my background is not from programming and this makes learning bit challenging. I’m trying to learn by practices : )
I’m also stuck at the source part since 3 days, I wanted to share my notebook but as I’m using company laptop I can’t access my google drive and will be unable to share. Sharing screenshot can work but that will be against community guidelines. Please let me know if I can DM you?
As per my current coding I’m getting below output which means data is not copied to subdirectories and folders are empty… this could be due to Source_dir defined/path is not correct
You need to read all the instructions in the grader cell and before the grader cell carefully.
then the comment I have shared
Literally explains each codes line by line.
using only os.makedir for creating your directory is totally incorrect. The instruction in the grader cell clearly indicates you to use root path which you are ignoring in your codes.
So with a totally fresh copy start again. stop referring to the codes you wrote because it is incorrect.