style-transfer icon indicating copy to clipboard operation
style-transfer copied to clipboard

Issue about Loss function

Open EthanZhangYi opened this issue 8 years ago • 1 comments

Content Loss and Style Loss are two loss functions used here. _compute_style_grad() -------- line 100 _compute_content_grad() -------- line 114 I do not understand why * (Fl>0) when computing gradient. Is there any specific reason? @fzliu

EthanZhangYi avatar Aug 18 '16 03:08 EthanZhangYi

If you go through the paper at http://arxiv.org/abs/1508.06576. You will find that the gradient will be 0 when Fl is less or equal to 0 in equation (2). That is why *(Fl > 0) is here.

consciousgaze avatar Sep 15 '16 08:09 consciousgaze