Fitting is very slow (dogs and cats)

Hi,

I am running an experiment with the dogs and cats data set, but for no obvious reason the fitting of the model is 6x slower than with Jeremy’s dogs_cats_redux notebook.

My setup:

  • AWS P2 instance
  • Theano 0.9 backend

How slow is it?
Jeremys dog_cats_redux notebook: ~ 400s
My notebook (code below): ~ 2400s

Here is code:

Question:
What do I need to change to make my code run as fast as Jeremy’s?

1 Like

Just found the issue.
I forgot to mark the old layers of the vgg model as trainable=False.

This is how it can be fixed:

for layer in model.layers: layer.trainable=False
model.add(Dense(2))
1 Like