[Google_Bootcamp_Day23]
Updated:
Neural style transfer
Cost function
Content cost function
- Assume you use hidden layer l to compute content cost (choose middle layer l)
- By using pre-trained ConvNet, forward propagate image C and image G.
- Let a(l)(c) and a(l)(G) be the activation of layer l on the images
- If a(l)(C) and a(l)(G) are similar, both images have similar content.
Style cost function
- Assume you use layer l’s activation to measure “style”
- Define style as correlation between activations across channels (compute how correlated are the activations across different channels in each positions)
- What does it mean when two channels are highly correlated?
- correlation tells you which of these high level texture components tend to occur or not occur together in part of an image
- if highly correlated, then high level texture components occur together in part of an image
- this gives you a measure of how similar is the style of the generated image to the style of the input style image
Style matrix
Final Style cost function
[source] https://www.coursera.org/learn/convolutional-neural-networks
Leave a comment