Thanks. Yeah, i had to modify the code a little bit to make it work. I am on Keras version 2.x. On a different note, are you running in the cloud or have set up everything locally.
Most of the changes need to be done in vgg16.py file. batches/val_batches/test_batches objects no longer have nb_class and nb_samples. These have been replaced with num_class and samples
If you don’t want to change vgg16.py, you can add something similar to the following in your main notebook.
/home/nbuser/courses/fastai/deeplearning1/nbs/vgg16.pyc in finetune(self, batches)
180 “”"
181 #self.ft(batches.nb_class) # commented this line due to error
–> 182 self.ft(batches.num_class)
183 classes = list(iter(batches.class_indices)) # get a list of all the class labels
184
AttributeError: ‘DirectoryIterator’ object has no attribute ‘num_class’