Hi @Or_Rimoch,



 Or_Rimoch:

I have 2 networks: Encoder (already trained) + Decoder.


I assume that you mean:

Encoder + Decoder (already trained).

If you set Decoder’ parameters’ requires_grad to False and you don’t pass them to the optimizer, there shouldn’t be any way for them to get modified.
Do you have a link to the code or a simple repro?