Project - Introduction to Neural Style Transfer using Deep Learning & TensorFlow 2 (Art Generation Project)

13 / 18

Getting the Target Content and Style

With StyleContentModel which is a style and content extractor, we can now implement the style transfer algorithm. Do this by calculating the mean square error for your image's output relative to each target, then take the weighted sum of these losses.

Let us set the style and content target values. We shall do this by extracting the style of the style image and content of the content image.

INSTRUCTIONS
  • Get the target content from content_image using extractor as follows:

    content_targets = extractor(content_image)['content']
    
  • Now similarly, get the target style from style_image using extractor.

    style_targets = << your code comes here >>(style_image)['style']
    
Get Hint See Answer


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...