Kaggle-Carvana-Image-Masking-Challenge
Kaggle-Carvana-Image-Masking-Challenge copied to clipboard
Getting StopIteration error
Hey,I am getting a StopIteration error when valid_generator( ) is called .The error is given below
StopIteration Traceback (most recent call last)
/Users/shivamchandhok/anaconda2/lib/python2.7/site-packages/keras/legacy/interfaces.pyc in wrapper(*args, **kwargs)
85 warnings.warn('Update your ' + object_name + 86 '
call to the Keras 2 API: ' + signature, stacklevel=2)
---> 87 return func(*args, **kwargs)
88 wrapper._original_function = func
89 return wrapper
/Users/shivamchandhok/anaconda2/lib/python2.7/site-packages/keras/engine/training.pyc in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, initial_epoch) 1807 batch_index = 0 1808 while steps_done < steps_per_epoch: -> 1809 generator_output = next(output_generator) 1810 1811 if not hasattr(generator_output, 'len'):
StopIteration:
Can't reproduce this issue. Is your Keras version up-to-date? If you remove validation from fit_generator do you still get the error?
yes the error is still there. there is some issue with the line generator_output=next(output_generator)
Have you tried on another Python environment?
My problem was that the train_mask data is the gif format. Converting them to png may solve this.
OpenCV doesn't read GIF. You can easily switch to sklearn.io.imread
Getting the same error...please help I have converted the GIF files to png format.. Still he issue exists
@ykataoka Converting them to png didn't solve this issue. Any other solutions?