style-transfer
style-transfer copied to clipboard
Issue about Loss function
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
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.