Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

image data generator keras with 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)
Source by yann-leguilly.gitlab.io #
 
PREVIOUS NEXT
Tagged: #image #data #generator #keras
ADD COMMENT
Topic
Name
4+1 =