I'm having some trouble getting the history from fit_generator.
I'm using the fit() method from vggg16.py, and I'd like to be able to record the accuracy as I fit the model using different batch sizes (since this strikes me as the last parameter to be optimized).
I edited vgg16.py to import History from keras.callbacks. I then edited the fit() method to (changes highlighted):
def fit(self, batches, val_batches, nb_epoch=1):
return self.model.fit_generator(batches, samples_per_epoch=batches.nb_sample, nb_epoch=nb_epoch, validation_data=val_batches, nb_val_samples=val_batches.nb_sample, callbacks=[history])
When I call this in my main notebook (having also imported keras.callbacks.History there), using
history = History()
history = vgg.fit(batches_train, batches_valid)
I get the following error:
AttributeError: 'History' object has no attribute 'History'
I've played around with this to no avail; any help is appreciated!