C4W1, problems with low structural similarity

Hi All,

In the neural style transfer programming assignment, I’m getting structural similarity of only .47. Even though it asks us not to change the settings, I tried experimenting and can increase ssim only a little by increasing style_weight to 2. Setting content_weight larger than it’s default setting 1e-32 decreases structural similarity. The generated image looks like a Kandinsky dog with some pixel artifacts. This assignment does not add tf.image.total_variation() to the loss, as was done in the colab. I tried adding it and get lower ssim.

Can someone help with this? Thank you!

The problem was the assignment to variable content_and_style_layers must be in the order style_layers + content_layers, to extract the different features types from the model and compute the style and content losses.