title: "ValueError: Asked to retrieve element 0, but the Sequence has length 0" in Convolutional Neural Network
body: <p>I am using this code: <a href="https://github.com/gsurma/image_classifier/blob/master/ImageClassifierCNN.ipynb" rel="nofollow noreferrer">https://github.com/gsurma/image_classifier/blob/master/ImageClassifierCNN.ipynb</a> but I get this error: <code>ValueError: Asked to retrieve element 0, but the Sequence has length 0</code> on this line: <code>probabilities = model.predict_generator(test_generator, TEST_SIZE)</code> . I followed this suggestion: <a href="https://stackoverflow.com/questions/63738213/how-can-i-get-rid-of-getting-error-through-test-generator">How can I get rid of getting error through test generator?</a> and I changed the above line to this: <code>probabilities = model.predict(test_generator, TEST_SIZE)</code> but does not work! And this: <a href="https://stackoverflow.com/questions/67806987/valueerror-asked-to-retrieve-element-0-but-the-sequence-has-length-0">ValueError: Asked to retrieve element 0, but the Sequence has length 0</a> has no solution for my case. Any idea what is wrong?</p>