Got error on wrong value, but really cannot find where my code is worng. thanks

tf.Tensor(0.17102128, shape=(), dtype=float32)
Test 1: tf.Tensor(0.17102128, shape=(), dtype=float32)

AssertionError Traceback (most recent call last)
in
25 print(“\033[92mAll test passed”)
26
—> 27 compute_total_loss_test(compute_total_loss, new_y_train )

in compute_total_loss_test(target, Y)
13 print("Test 1: ", result)
14 assert(type(result) == EagerTensor), “Use the TensorFlow API”
—> 15 assert (np.abs(result - (0.50722074 + 1.1133534) / 2.0) < 1e-7), “Test 1 does not match. Did you get the reduce sum of your loss functions?”
16
17 ### Test 2

AssertionError: Test 1 does not match. Did you get the reduce sum of your loss functions?

Expected output

Test 1: tf.Tensor(0.810287, shape=(), dtype=float32)
Test 2: tf.Tensor(3.295837, shape=(), dtype=float32)

Here’s a thread with the checklist for all the common mistakes on this function.

I believe that incorrect answer (0.171…) is what you get if you neglect the point about transposing the inputs. Here’s a thread which explains why that is required.