Please help as I’m stuck. I believe my error may be from not dividing by the num_examples but I can’t determine the code to use. Below is the output from the run.
Test 1: tf.Tensor(40.436035, 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?