Great work. I appreciate that you share the codes.
How do these losses involve in the backwards?. In this part, just compute the output from the model.
do they internally calculate loss?
https://github.com/dvlab-research/Ref-NPR/blob/main/exps/refnpr/ref_opt.py#L326-L354