I submitted the code to the grader and I received weird failed test cases, for which I don’t have any idea why it is happening:
Failed test case: There was an error grading this function. Details shown in ‘got’ value below:.
Expected:
no exceptions,
but got:
.
All tests passed for train_val_generators!
Details of failed tests for create_model
Failed test case: There was an error grading this function. Details shown in ‘got’ value below:.
Expected:
no exceptions,
but got:
[Errno 2] No such file or directory: ‘./data/images/’.
Can anyone point out the reason why it is happening and what to look out for in the code?
Please don’t use os.chdir in the program without changing it back to the previous location. The effect of changing directory is permanent and not local to the function. If you look at your code, there’s no need for it the call to change the directory as you are creating the full path to the source file.
There’s one more bug in your implementation of split_data. Read the instructions again to fix it.
Hi Yash.
Here’s an example snippet where the markers exist in the starter code:
def split_data(SOURCE_DIR, TRAINING_DIR, VALIDATION_DIR, SPLIT_SIZE):
"""
Splits the data into train and test sets
Args:
SOURCE_DIR (string): directory path containing the images
TRAINING_DIR (string): directory path to be used for training
VALIDATION_DIR (string): directory path to be used for validation
SPLIT_SIZE (float): proportion of the dataset to be used for training
Returns:
None
"""
### START CODE HERE
pass
### END CODE HERE