Week 4, Programing assignment Deep Learning & Art, Exercise 3 - compute_layer_style_cost
I’ve checked my code several times, and the dimensions of the GS and GG are correct. But somehow, my result doesn’t match the correct answer!!!
I got 2.9225328 for J_style_layer_SG, but the correct value is 14.01649.
tf.Tensor(2.9225328, shape=(), dtype=float32)
"---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
Input In [19], in <cell line: 3>()
1 ### you cannot edit this cell
----> 3 compute_layer_style_cost_test(compute_layer_style_cost)
File /tf/W4A2/public_tests.py:57, in compute_layer_style_cost_test(target)
55 assert np.isclose(J_style_layer_GG, 0.0), “Wrong value. compute_layer_style_cost(A, A) must be 0”
56 assert J_style_layer_SG > 0, “Wrong value. compute_layer_style_cost(A, B) must be greater than 0 if A != B”
—> 57 assert np.isclose(J_style_layer_SG, 14.01649), “Wrong value.”
59 print(“J_style_layer = " + str(J_style_layer_SG))
60 print(”\033[92mAll tests passed")
AssertionError: Wrong value."