Neural Style Transfer

ke, 22 July 2018

[ deep_learning  ]
  • neural style transfer

what are deep convnets learning?

  • cost function

Content c + Style S = Generated image G
J(G) = alpha * Jcontent(C, G) + beta * Jstyle(S, G)

find the generated image G

  1. Initiate G randomly
  2. Use gradient descent to minimize J(G)
  • content cost function

say you use hidden layer l to compute content cost
use pre-trained ConvNet.(E.g., VGG network)
Let al and al be the activation of layer l on the images
If al and al are similar, both images have similar content
Jcontent(C,G) = 1/2 ||al - al||^2

Here, nH,nW and nC are the height, width and number of channels of the hidden layer you have chosen, and appear in a normalization term in the cost.

  • Style cost function