Due to the limitation of RAM memory, I followed these instructions and built a generator that draw small batch and pass them in the fit_generator of Keras.
But Keras can\'t
I have figured it out.
My model was from keras.models import Model
However the generator was extended from class DataGenerator(tf.keras.utils.Sequence):
That causes the bug!
So, just change the Generator class DataGenerator(tf.keras.utils.Sequence) to class DataGenerator(keras.utils.Sequence):