Bilddatengenerator Keras mit tf.data.data.from_generator

...

ds = tf.data.Dataset.from_generator(
    img_gen.flow_from_directory, args=[flowers],
    output_types=(tf.float32, tf.float32),
    output_shapes=([32, 256, 256, 3], [32, 5])
)

# Then just to try
it = iter(ds)
batch = next(it)
Misty Mamba