Please see the following blog post for more details about this code Keras Tutorial : Transfer Learning using pre-trained models