Reputation: 1
So I have been reading the paper published by Leon Gatys in 2016 explaing neural style transfer, but I still don't understand what is happening in content loss, style loss or total loss. Can someone explain it in simple terms what is happening in those steps of the algorithm.
Upvotes: 0
Views: 402
Reputation: 1
Check out my GitHub repository: https://github.com/Bibhash123/Neural-Style-Transfer
So in content loss we are finding the mean squared error between an intermediate feature map for the generated image and the content image. In the style loss we find error between intermediate feature maps for style image and generated image using gram matrices. The total loss is calculated as a weighted sum of the above mentioned losses. What actually happens is when the total loss is optimized, presence of content loss in total loss ensures the presence of content features in the generated image. Use of gram matrices for style loss ensures optimized distribution of style features in the generated image. I am no expert and thus this answer might have mistakes, but this is what I understood so far.
Upvotes: 0