Hi I am stuck computing the total_loss function
I tried multiple options but failed, below is my last variant
{moderator edit - solution code removed}
it gives the error
tf.Tensor(40.436035, shape=(), dtype=float32)
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-32-0a8e136fceea> in <module>
17 print("\033[92mAll test passed")
18
---> 19 compute_total_loss_test(compute_total_loss, new_y_train )
<ipython-input-32-0a8e136fceea> in compute_total_loss_test(target, Y)
13 print(result)
14 assert(type(result) == EagerTensor), "Use the TensorFlow API"
---> 15 assert (np.abs(result - (0.50722074 + 1.1133534) / 2.0) < 1e-7), "Test does not match. Did you get the reduce sum of your loss functions?"
16
17 print("\033[92mAll test passed")
AssertionError: Test does not match. Did you get the reduce sum of your loss functions?
Expected output
tf.Tensor(0.810287, shape=(), dtype=float32)
Can you please hint what I am missing ?