JuanFMontesinos:

o use subnetworks to get some values without affecting backprop?
Whatever you run helps to build a computational graph which will be further backpropagated.
If you need to use subnetworks to obtain values


Thank u for your reply. Well, my question is if I get value from subnetworks with self-defined function instead of  forward function in nn.module, will it affect backprop process, for example, the subnetwork won’t backprop correctly. But it turns out that it’s no necessary to use the forward function.