AgeProgression icon indicating copy to clipboard operation
AgeProgression copied to clipboard

what is the meaning of " reg_loss = 0 * reg # ?" in model.py

Open xiaopanchen opened this issue 5 years ago • 0 comments

reg = l1_loss(generated[:, :, :, :-1], generated[:, :, :, 1:])
+ l1_loss(generated[:, :, :-1, :], generated[:, :, 1:, :])

                # reg = (
                #        torch.sum(torch.abs(generated[:, :, :, :-1] - generated[:, :, :, 1:])) +
                #        torch.sum(torch.abs(generated[:, :, :-1, :] - generated[:, :, 1:, :]))
                # ) / float(generated.size(0))
                reg_loss = 0 * reg  # ?
                reg_loss.to(self.device)

xiaopanchen avatar Jan 23 '21 13:01 xiaopanchen