Course4 - Week 4 - Assignment 2 - Exercise 3- compute_layer_style_cost


I have followed all the instructions including additional instructions (done reshaping and transpose) but I am getting wrong value for J_style_layer . Please help me to solve this.

J_style_layer!! = tf.Tensor(1794.279, shape=(), dtype=float32)

AssertionError Traceback (most recent call last)
9 assert np.isclose(J_style_layer_GG, 0.0), “Wrong value. compute_layer_style_cost(A, A) must be 0”
10 assert J_style_layer_SG > 0, “Wrong value. compute_layer_style_cost(A, B) must be greater than 0 if A != B”
—> 11 assert np.isclose(J_style_layer_SG, 14.017805), “Wrong value.”
13 print("J_style_layer = " + str(J_style_layer_SG))

AssertionError: Wrong value.

Since your cost value is way too high, maybe you didn’t get the denominator correct.
There are also quite a few places to get the transpose and reshaping incorrect.