tf.data.generator accepts function returning an iterator, or a promise of an iterator, which disallow async generator (which returns not a promise of an iterator but an iterator of promises). it is in fact already supported to pass it an async generator, as iteratorFromFunction works with an iterator function returning promises.
this PR simply adds it as a supported type (and rework the documentation a bit).
tf.data.generator
accepts function returning an iterator, or a promise of an iterator, which disallow async generator (which returns not a promise of an iterator but an iterator of promises). it is in fact already supported to pass it an async generator, asiteratorFromFunction
works with an iterator function returning promises.this PR simply adds it as a supported type (and rework the documentation a bit).
related issue #7801