You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any possibility of using a generator in the data function for datasets that don't fit in memory? Keras' fit_generator method doesn't seem to be used anywhere.
Any suggestions on how this could be achieved?
The text was updated successfully, but these errors were encountered:
Hey, I started implementing it a while ago, but haven't finished due to time constraints. It's definitely something on my roadmap.
How this can be achieved?
The idea is to allow the data function to return a tuple of generators instead of loaded datasets:
importitertoolsdefdata_fn(a=1, b=10):
defmygen(a):
foriinrange(a):
yielditrain=itertools.cycle(mygen(a))
train.steps_per_epoch=a# pass the number of samples per epochvalid=itertools.cycle(mygen(b))
valid.steps_per_epoch=breturntrain, valid
One would need to update the code at all the positions where model.predict, model.evaluate gets called with a conditional statement checking whether we are dealing with an iterator or a full dataset:
Is there any possibility of using a generator in the data function for datasets that don't fit in memory? Keras' fit_generator method doesn't seem to be used anywhere.
Any suggestions on how this could be achieved?
The text was updated successfully, but these errors were encountered: