I am using a Mask-RCNN. I first chose the resnet50 backbone then downloaded COCO pre-trained weights.

Why do I need pre-trained weights for transfer learning?

The transfer learning approach is to train a base network and then copy its first layers of the target. My base network is resnet50 and I copied the first layers to Mask RCNN. So, why do I need pre-trained weights, for example, coco pre-trained weights?

I understand that I copy layers and pre-trained weights from resnet.

Thanks in advance.


2 Answers 2


When you are calling a pre-trained model (resnet50 in your case) for performing transfer learning, only the model's architecture is actually called. This architecture is practically useless to perform any sort of computational operation on the data and predicting any output unless trained. For that, you will need the weights (variables understood by the model on some previous dataset).

Weights are more like mathematical coefficients which take the input and performs the computation on the input to generate a required output. They are more like the coefficient in a linear algebra problem. This is the actual reason why it is required to call the weights for the model.

Even if you are not calling any weights in you model, you can make your model trainable and train the same to generate your own weights that fit your data properly rather than fine-tuning your model. Read more about the same here


You need pre-trained weights for it to be Transfer Learning.

Copying layer structures is not transfer learning, it is just structuring a network inspired/copied from others.

The transfer learning consists of using pre-trained layers to construct a different network that migth have similarities in the first layers. That is usually useful for Deep Learning.

So the reasons for using Transfer Learning are:

  • You want to analyse something different in a dataset that was used to train another network

  • You want to perform classification in a class that was used to train a certain network but was not annotated before

  • You want to train a network for a problem similar to the other one and don't have time or computational power to retrain all layers


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.