generative deep learning heredistance is norm function such as the normcontent is function that takes an image and computes representation of its contentand style is function that takes an image and computes representation of its style minimizing this loss causes style(generated_imageto be close to style(reference_image)and content(generated_imageis close to content(generated_image)thus achieving style transfer as we defined it fundamental observation made by gatys et al was that deep convolutional neural networks offer way to mathematically define the style and content functions let' see how the content loss as you already knowactivations from earlier layers in network contain local information about the imagewhereas activations from higher layers contain increasingly globalabstract information formulated in different waythe activations of the different layers of convnet provide decomposition of the contents of an image over different spatial scales thereforeyou' expect the content of an imagewhich is more global and abstractto be captured by the representations of the upper layers in convnet good candidate for content loss is thus the norm between the activations of an upper layer in pretrained convnetcomputed over the target imageand the activations of the same layer computed over the generated image this guarantees thatas seen from the upper layerthe generated image will look similar to the original target image assuming that what the upper layers of convnet see is really the content of their input imagesthen this works as way to preserve image content the style loss the content loss only uses single upper layerbut the style loss as defined by gatys et al uses multiple layers of convnetyou try to capture the appearance of the stylereference image at all spatial scales extracted by the convnetnot just single scale for the style lossgatys et al use the gram matrix of layer' activationsthe inner product of the feature maps of given layer this inner product can be understood as representing map of the correlations between the layer' features these feature correlations capture the statistics of the patterns of particular spatial scalewhich empirically correspond to the appearance of the textures found at this scale hencethe style loss aims to preserve similar internal correlations within the activations of different layersacross the style-reference image and the generated image in turnthis guarantees that the textures found at different spatial scales look similar across the style-reference image and the generated image in shortyou can use pretrained convnet to define loss that will do the followingpreserve content by maintaining similar high-level layer activations between the target content image and the generated image the convnet should "seeboth the target image and the generated image as containing the same things licensed to