Hi, I am trying to go through cats and dogs redux python notebook. Apparently the fit_generator api for vgg16 model have changed. I ran this portion of the notebook which is -
latest_weights_filename = None for epoch in range(no_of_epochs): print( "Running epoch: %d", epoch) vgg.fit(batches, val_batches, nb_epoch=1) latest_weights_filename = 'ft%d.h5' % epoch vgg.model.save_weights(results_path+latest_weights_filename) print( "Completed %s fit operations", no_of_epochs)
It was giving me the following warning -
Running epoch: %d 0 ../utils/vgg16.py:213: UserWarning: Update your `fit_generator` call to the Keras 2 API: `fit_generator(<keras.pre..., validation_data=<keras.pre..., steps_per_epoch=3, epochs=1, validation_steps=50)` Epoch 1/1 2/3 [===================>..........] - ETA: 124s - loss: 2.4474 - acc: 0.4219
The run time is very slow , given that I am using a sample size of 200 train and 50 test images.
What changes should I make to vgg16.py to make it compatible to keras api 2.0.
Thanks.