CompVis / adaptive-style-transfer

source code for the ECCV18 paper A Style-Aware Content Loss for Real-time HD Style Transfer
https://compvis.github.io/adaptive-style-transfer/
GNU General Public License v3.0
723 stars 139 forks source link

Why is the style-aware content loss inconsistent in your paper and program? #8

Closed angleboy8 closed 3 years ago

angleboy8 commented 5 years ago
Hi, excuse me. I have a problem, and hope you to help me, please.

In your paper, you define a style-aware content loss as normalized squared 

Euclidean distance between E(xi) and E(yi) in the formula (3).

However, in your program "model.py", it use L1 norm for a style-aware content loss. For instance,
self.feature_loss_photo = abs_criterion(self.output_photo_features, self.input_photo_features)

Thank you for your help!
asanakoy commented 3 years ago

Hi. Thanks for noticing! We haven't noticed any significant difference when changed between L1 and L2 loss. So you can change it to L2 if you want, but you might need to change the loss weight in this case.