Open huahua-c opened 3 years ago
Since the weight parameters of the target network are determined by the hyper network, the target network shoudn't participate the process of training.
Note that by setting 'Requires_grad = False', the target network doesn't allocate gradients during training, but it still delivers gradients to its former hyper network, which makes our model trainable.
I see. Thank you very much for your answer!
Since the weight parameters of the target network are determined by the hyper network, the target network shoudn't participate the process of training.
Note that by setting 'Requires_grad = False', the target network doesn't allocate gradients during training, but it still delivers gradients to its former hyper network, which makes our model trainable.
Hi @SSL92, have you tried the other way? Is the result different?
Hi @SSL92 @huahua-c, I tested and found the the program never ran into the for loop, for param in model_target.parameters():
. These two lines are indeed redundant.
Thank you very much for your work!I have some questions to ask you.Please help me.In the hyperiqasolver.py file, why Param. Requires_grad = False? Look forward to your answers. model_target = models.TargetNet(paras).cuda() for param in model_target.parameters(): param.requires_grad = False