My submission got 48/50 with the following testing set:
incorrect number of (training, validation) images when using a split of 0.5 and 12 images (6 are zero-sized).
Expected:
(3, 3),
but got:
(4, 5).
Any suggestions? Thanks
My submission got 48/50 with the following testing set:
incorrect number of (training, validation) images when using a split of 0.5 and 12 images (6 are zero-sized).
Expected:
(3, 3),
but got:
(4, 5).
Any suggestions? Thanks
Please see this thread for the steps your code should implement.
My logic is
1.put all files in a list in that directory
2.check if a file is >0, if size >0: the fileList not change.
3.else: the fileList.remove(this file)
4.split into train/validation by
I got the same result in the assignment–
‘’’
666.jpg is zero length, so ignoring.
11702.jpg is zero length, so ignoring.
Original cat’s directory has 12500 images
Original dog’s directory has 12500 images
There are 11249 images of cats for training
There are 11249 images of dogs for training
There are 1250 images of cats for validation
There are 1250 images of dogs for validation
‘’’
But when submit the work, I got one testing case wrong
Please click my name and message your notebook as an attachment along with grader feedback.
Removing objects while iterating through the same collection is a bad idea.
Please use a separate list for those images whose size is not zero.
The grader feedback means the following:
split_data
function with SPLIT_SIZE = .5
.See this as well.
Thanks so much, I fixed the bugs and re-submitted, got 100% correct. Appreciated your great help!
Please read this