NST cant find problem with code

this is my code to compute the style cost

[removed the code as per instructions]

test case says answer is 14.01649 but i get 2.9225328

please let me know where the bug is

Please do not post your code on the forum. That’s not allowed by the Code of Conduct.

If a mentor needs to see your code, we’ll contact you with instructions.

1 Like

Please read this notebook hint:

  1. Unroll the hidden layer activations a_S and a_G into 2D matrices, as explained in the picture above (see the images in the sections “computing the content cost” and “style matrix”).
    - You may use tf.transpose and tf.reshape.

and this link on reshape. Look for:

To instead reorder the data to rearrange the dimensions of a tensor, see tf.transpose.