- Using pretrained VGG19 model
- Using only layer index 0, 5, 10, 19, 28
- Load content image
- Load style image
- Generate random white noise target image
=> Resize style and target image to size of content image
- style_weight: 1000,
- content_weight: 1,
- learning_rate: 0.001
- epochs: 6000
Using Adam optimizer with parameters is target_images
- Calculate content loss
- Calculate style loss:
Gram matrix:
$$G = \frac{1}{chw}(target_img.target_img^T)$$
$$A = \frac{1}{chw}(style_img.style_img^T)$$
$$style_loss = \frac{1}{2ch*w}.(G - A)^2$$