February 2018
Intermediate to advanced
262 pages
6h 59m
English
The style loss is calculated across multiple layers. Style loss is the MSE of the gram matrix generated for each feature map. The gram matrix represents the correlation value of its features. Let's understand how gram matrix works by using the following diagram and a code implementation.
The following table shows the output of a feature map of dimension [2, 3, 3, 3], having the column attributes Batch_size, Channels, and Values:

To calculate the gram matrix, we flatten all the values per channel and then find correlation by multiplying with its transpose, as shown in the following table:
All we did is flatten all the values, with ...