Reputation: 711
I would like to applicate a function (gaussian_filter) to my dataset with map
here is a part of my code
datagen = tf.keras.preprocessing.image.ImageDataGenerator(vertical_flip=True)
training_set = datagen.flow_from_directory('/home/train/',target_size=(224, 224), batch_size = 2)
train_dataset = training_set.map(gaussian_filter, num_parallel_calls=tf.data.experimental.AUTOTUNE)
but I find this error
AttributeError: 'DirectoryIterator' object has no attribute 'map'
Help please, how change the code?
Upvotes: 2
Views: 2536