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

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:

- 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.