Neural Style Transfer
How computers dream
By
Keshan Sodimana
What is so cool about
Prisma?
Content
+
Style
Generated
Content Loss / Content Cost function
Style Loss / Style Cost Function
Gram Matrix
● The Gram matrix is a square matrix that contains the dot
products between each vectorized filter in layer l.
● The Gram matrix can therefore be thought of as a non-
normalized correlation matrix for filters in layer l.
Content loss function
Gram matrix
Style loss for a given
layer
Style loss
Finally we need to minimize this total
loss..
How to generate the image:
1. Initiate the generated image with random noise
2. Calculate content and style costs
3. Use gradient descent to minimize cost of generated image or
the total loss as seen in the previous slide.
Enough bullshit let’s code!

Neural style transfer

Editor's Notes

  • #3 Filters like instagram
  • #5 Existing architectures, Inception, AlexNet, VGG
  • #8 Output image initialized with random noise
  • #10 Degree of correlation in channels how often channels occur together.