Project - Training from Scratch vs Transfer Learning

8 / 8

Evaluating the models

  • Now that we have the two models model_B and model_B_on_A for classifying the B dataset, let us evaluate the performance of the model based on their accuracies on the test data of B data set.
INSTRUCTIONS
  • Use evaluate() method on model_B and pass X_test_B and y_test_B as arguments to it.

    model_B.<< your code comes here >>(X_test_B, y_test_B)
    
  • Use evaluate() method on model_B_on_A and pass X_test_B and y_test_B as arguments to it.

    << your code comes here >>(X_test_B, y_test_B)
    

    We observe that the accuracies of both models are almost the same.

    We also see that the performance of model_B_on_A - with as less as 51 trainable parameter - stands to be as great as that of model_Bwith as many as 275,801.

    So, with very little training, model_B_on_A is performing really well. This saves time and resources even in real-time scenarios. This is the beauty of using pre-trained layers. This method is also known as transfer learning - transferring the knowledge obtained from solving one problem to solving another similar problem.

Get Hint See Answer


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

Loading comments...