Concatenate FC layers to layers of trained model

Hi @gil_bc
If you had defined a particular layer such as self.fc1 = nn.Linear(..) in your original model_1 then you’ll be able to extract the model’s weights using weights = model_1.fc1.weight.data.
You define in model_2 this same layer and initialise it wights and freeze it.

In model_2 code:

self.fc1.weight = weights     #with or without grad

Let me know if this worked.

Some useful discussions that you should look at.