SSL92 / hyperIQA

Source code for the CVPR'20 paper "Blindly Assess Image Quality in the Wild Guided by A Self-Adaptive Hyper Network"
MIT License
346 stars 52 forks source link

Why setting 'params.requires_grad=False' for target_network? #5

Closed luofan18 closed 3 years ago

luofan18 commented 3 years ago

https://github.com/SSL92/hyperIQA/blob/3c4fe1366f1cc851efc64015f293aaf7fc7eaa0c/HyerIQASolver.py#L50-L56

Hi, thanks for releasing your code. I find that you set requires_grad=False for target_networks. This is a little confusing. Since the parameter of target network are generated by hyperNet, would setting requires_grad to False block loss of targetnet backpropogating to parameters of hyperNet and make the parameters of hypernet do not update?

luofan18 commented 3 years ago

I just tested model_target.parameters() and turned out it was empty. So, this piece of code would has no effect on final result.