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.
This is the code i am currently using:
import tensorflow.contrib.keras as keras
import vgg16; reload(vgg16)
from vgg16 import Vgg16
vgg = Vgg16()
path = '/home/gertjan/Documents/data/'
batches = vgg.get_batches(path + ‘train’, batch_size=64)
val_batches = vgg.get_batches(path + ‘validation’, batch_size=64)
vgg.fit(batches, val_batches, nb_epoch=2)
When i run this i get the following error:
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.
Thanks in advance.