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:
- Create a source directory with 12 images where 6 images are empty and invoke the
split_data
function withSPLIT_SIZE = .5
. - The expected outcome is that each training and validation directories will contain 3 images.
See this as well.