I am trying to get the first model to work, which is the vgg16 model, everything looks to load fine and I did not change anything in the vgg16.py file only changed something in the first 6 sentences of the notebook.
AttributeError: ‘DirectoryIterator’ object has no attribute ‘nb_class’
I found the nb_class being called like this : batches.nb_class in the finetune function and I have tried some things but can not figure out why it is not working, any help would be greatly appreciated.
Apparantly the problem was because of keras2, it has name changes for nb_class. In this post there is a solution + some extra information about what changed: Keras 2 Released
You would need to do the following .First modify VGG 16.py
Updated self.ft(batches.nb_class) to self.ft(batches.num_class)
Next update the following .in the function def fit in vgg16.py
batches.nb_sample to batches.samples and val_batches.nb_sample to val_batches.samples
Next
Update for Keras 2.1 - we should use 'num_classes’ instead of ‘num_class’ change the same in vgg16.py. Hope this will help for you.
my current keras version is 2.2.4 . between i have found the updates of vgg16.py and have changed as mentioned. but there is no change for even the error itself because i have changed the nb_class to num_class and even after that the same error is poping up.AttributeError: ‘DirectoryIterator’ object has no attribute 'nb_class’
please do specify if there is anything i have missed to update in vgg16.py file