Use trained layers for new objective

Hi,
I have trained a network with good accuracy for a certain purpose. Now I believe the network contains interesting internal conclusions about my data.

So I wish to connect some of the layers in my trained network with a new, untrained network, that would learn a new objective.
So let’s say I want to use the first few layers of the trained network, concatenate them to new layers and train the whole thing together.

How would I perform such thing?
many thanks

Hi @gil_bc , can you relate your problem to this https://github.com/ChetanPatil28/Pytorch_In_and_Out/blob/master/Selective_Transfer_Learning.py ?

1 Like