Confusion about the training procedure while using transfer learning Suppose that we have a trained CNN, there is 5 conv layers and 3 fully connected layers. We take the first 5 conv layers as it is (with their parameter settings: like kernel size, activation etc) and their weights and biases which are trained before by using another dataset.
If we want to profit from this knowledge in our new model (which has the same 5 conv layers at the beginning but later is different), do we:

*

*Continue to train the whole model (at the beginning: 5 conv layers is initialized to the parameters found in the previous training and the later layers some other initialization (e.g. he initialization for weights and 0 for biases)) with our data?

or

*

*We keep the first 5 conv layers as in the test mode (no more update) and only update/train the parameters in later layers?

Which one is understood/done when we talk about transfer learning?
Note: I am not very familiar with all the terminology used in deep learning. However, I hope that I could at least explain my question.

Generally transfer learning is used as an umbrella term for any procedure that could leverage pre-trained models for different tasks. Currently, it is de-facto practice in NLP and multi task learning and also Google's new architecture pathways.
In strict sense, transfer learning implies using weights coming from the previous experience, given architecture is fixed. Simple weight transfer might not be sufficient in this strict setting, all the state of the previous model should be retained. Then, training is resumed with the new data.
However, freezing earlier layers may not be full transfer-learning, as in changing the task but fine tuning for a closely related learning. It appears to be the "degree of how much to transfer" is controlled by freezing part of the network weights.
An other justification for freezing certain parts of the weights are to prevent catastrophic forgetting, but this appears to be again an open research field, see here
See also:

*

*Foundation models : Is it a new paradigm for statistics and machine learning?

*Transfer Learning on Autoencoders?

*How to resume training in neural networks properly?.

