MUNIT icon indicating copy to clipboard operation
MUNIT copied to clipboard

Why recon_criterion is not implemented with PyTorch L1Loss()?

Open jj0mst opened this issue 5 years ago • 1 comments

I dont' understand why you use this line as reconstruction loss: https://github.com/NVlabs/MUNIT/blob/4837f034fba1a49d6d6675e7eb954caefd698375/trainer.py#L54

I came from the UNIT repository where it is implemented with the official PyTorch L1Loss and saw that the reconstruction for the content features explodes (e.g. loss_gen_recon_c_a is 50 millions at the first iteration). Do you know why this happens? Aren't they equivalent?

jj0mst avatar Apr 11 '19 16:04 jj0mst

I am not the author, but I think that it's because L1Loss can't handle 2 Tensors with requires_grad=True I faced the same problem

AverageName avatar May 17 '20 08:05 AverageName