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
I encountered the same issue.
I had a python generator: gen tf.data.Dataset.from_generator(lambda: gen, ....)
It does not support repeat. But if I define a lambda generator outside of tf.data.from_generator(gen_lambda, ...) as follows
gen_lambda = lambda: gen
tf.data.Dataset.from_generator(gen_lambda, ....) solved the issue.
System information
Describe the current behavior
A
tf.data.Dataset
created usingfrom_generator()
is consumed and not recreated/repeated even when explicitly invoking therepeat()
method.Describe the expected behavior
If
repeat()
is being invoked, repeat the dataset.Code to reproduce the issue
#25254 (comment)
Other info / logs
The issue is present both when manually iterating over it in a custom training scenario and when using
tf.keras.Model.fit()
.The text was updated successfully, but these errors were encountered: