Clarification about keras.utils.Sequence
https://www.py4u.net/discuss/1492810Keras have very little info about keras.utils.Sequence, actually the only reason I want to derive my batch generator from keras.utils.Sequence is that I want to not to write thread pool with queue by myself, but I'm not sure if it's best choice for my task, here is my questions:. What should __len__ return if I have random generator and I don't have any predefined 'list' with samples.
Python & NumPy utilities - Keras
https://keras.io/api/utils/python_utilstf. keras. utils. Sequence Base object for fitting to a sequence of data, such as a dataset. Every Sequence must implement the __getitem__ and the __len__ methods. If you want to modify your dataset between epochs you may implement on_epoch_end. The method __getitem__ should return a complete batch.