zsyOAOA / DifFace

DifFace: Blind Face Restoration with Diffused Error Contraction (TPAMI, 2024)
Other
628 stars 42 forks source link

self.loss_fun in trainer.py is not defined. #1

Closed bwhwang closed 1 year ago

bwhwang commented 1 year ago

Thank for sharing your great work!! : )

We have tried to training DifFace with SwinIR diffused estimator and got an error that self.loss_fun(line 492, 495 in trainer.py) is not defined.

        if last_batch or self.num_gpus <= 1:
            loss = self.loss_fun(hq_pred, micro_data['gt']) / hq_pred.shape[0]
        else:
            with self.model.no_sync():
                loss = self.loss_fun(hq_pred, micro_data['gt']) / hq_pred.shape[0]

======================= Please check these lines.

zsyOAOA commented 1 year ago

We have corrected this bug and the configuration file. Please re-download our repository. Thanks. @bwhwang