AttributeError: 'DirectoryIterator' object has no attribute 'flow_from_directory'
not able to get the attributes ??
where should i place or edit attribute.txt file to solve this error???
That seems a problem with keras ImageDataGenerator.
Can you share the load dataset code if you changed it?
How is organized your image directory path?
hey
i got that done ... was some issue with my tensorflow version.. thanks
Glad you found it out!
Hey Goldesel23, I am not able to figure what's wrong here! AttributeError: 'DirectoryIterator' object has no attribute 'flow_from_directory' Can you help me out here?
Did you edit the loader? What TensorFlow version are you using? It seems related to ImageDataGenerator
No I haven't edited the loader.
train_data_gen = image_generator.flow_from_directory(directory=str(data_dir),
batch_size=BATCH_SIZE,
shuffle=True,
target_size=(IMG_HEIGHT, IMG_WIDTH),
classes = list(CLASS_NAMES))
Tensorflow version == 2.1.0
In data_dir I have set path to all the subfolders containing images of different class. And in CLASS_NAMES, I have added all the class names.
This code was supposed to work with tensorflow 1. I am not sure that it works with tf2. Like @kunalr326 referred, it could be related to tf version.
Okay, then I'll check that. Thanks, man!
Hi, I am getting the same error with TensorFlow 2.8 and I am loading my dataset from a directory. Can anyone please help me with it?
Hi @Abdulrahman-CS99 This code was written in tensorflow 1. You might need to re-adapt it to Tensorflow V2
'DirectoryIterator' object has no attribute 'repeat'
can u help plz
Hi @satyam2369,
Without a look at the changes you made to the code I cannot help much. Notice that the code was written in Tensorflow 1, so you will need to adapt part of it.
from tensorflow.keras.applications.vgg16 import VGG16 check whether you have imported the VGG16 like this Mine worked with the tensorflow 2.x as well
Which version did you use to make it work?
AttributeError: 'DirectoryIterator' object has no attribute '_assert_compile_was_called'