Okay, I seemed to have reshaped and transformed successfully since there are no more errors, but I think I am not passing one of the tests because my function is returning the wrong cost value (14.0178 instead of 14.01649)
(1, 4, 4, 3)
(1, 4, 4, 3)
(3, 16)
(3, 16)
tf.Tensor(0.0, shape=(), dtype=float64)
(1, 4, 4, 3)
(1, 4, 4, 3)
(3, 16)
(3, 16)
tf.Tensor(14.01780730574792, shape=(), dtype=float64)
AssertionError Traceback (most recent call last)
Input In [18], 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.
What is strange is I noticed I got the same value as Paul in this post.
Any ideas?