Style loss
The original paper on neural style transfer, A Neural Algorithm of Artistic Style, by Gatys et al. (https://arxiv.org/abs/1508.06576), leverages multiple convolutional layers in the CNN (instead of one) to extract meaningful patterns and representations capturing information pertaining to appearance or style from the reference style image across all spatial scales, irrespective of the image content. The style representation computes correlations between the different features in different layers of the CNN.
Staying true to the original paper, we will be leveraging the Gram matrix and computing the same over the feature representations generated by the convolution layers. The Gram matrix computes the inner product between the feature ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access