Course 2 Week 1 Assignment Grader Issue

Hi there. My code for the assignment of course 2 week 1 seems to run fine, achieving all the expected results and achieving the required model accuracy. However, I get the following error message from the grader and 0/50 points:
“There was a problem compiling the code from your notebook. Details:
Sample larger than population or is negative”

Please could you help to get past this?

Many thanks

[code removed - moderator]

1 Like

You’ve hardcoded 12500 as the size of the dataset when sampling data. If the grader tests the implementation with say, 20 images, then, the implementation will cause an error. Please use the length of the data when making decisions.

Thanks a lot for spotting that!

Thanks, i got the same issue, thanks for solution