Pytorch-Tutorials
Pytorch-Tutorials copied to clipboard
why returning style loss + style loss?
I am wondering why style loss + style loss is returned in function closure(). Could you give an explanation?
wow that's a typo! thanks.. correct is to return content_loss+style_loss, I fixed it. but interestingly it works anyway...
Probably because each loss already gets back-propagated when doing 'style_score += sl.backward()' and 'content_score += cl.backward()'.