Project - Introduction to Transfer Learning (Cat vs Non-cats Project)

18 / 26

Cats vs Non-cats using Transfer Learning - Compile the VGG16 model

In addition to adding the custom dense layers to train, we should also mention some other factors like:

  • the optimization algorithm
  • learning rate
  • loss function
  • metrics of evaluation and others.

We shall now see how to do this.

INSTRUCTIONS
  • Instantiate SGD optimizer with learning rate lr=0.025.

    sgd = SGD(lr=0.025)
    
  • Now let us compile the vgg_model and mention the loss as 'binary_crossentropy' since this is a binary classification, optimizer as sgd which we mentioned above, and metrics as accuracy.

    <<  your code comes here >>.compile(loss=<< your code comes here >>, optimizer=sgd,    metrics=['accuracy'])
    
Get Hint See Answer


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...