Hi (first of all; I’ve checked the related posts but couldn’t find a solution to my problem)!
I’m getting “Test does not match. Did you get the reduce sum of your loss functions?” error. I’ve used transpose, reduce_sum (or reduce_mean) but can’t get the correct result.
I suspect a mistake in previous functions. In exercise 2, with the sigmoid function, I pass the tests but the expected output provided is different than what I get (mine shows the tensor’s value along with its data type and shape instead of the expected output that only shows the value). I wonder if this could be a reason.
And in exercise 4, with the initialize_parameters function, I hard-coded the size of the variables that were initialized. Again, I passed the tests but I wonder if this could have caused a problem in Exercise 6.
Here it is:
tf.Tensor(6.7393394, shape=(), dtype=float32)
AssertionError Traceback (most recent call last)
in
17 print(“\033[92mAll test passed”)
18
—> 19 compute_total_loss_test(compute_total_loss, new_y_train )
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?
Sorry, I meant to close the loop on the public thread: I had a DM conversation with Zeynep yesterday and the problem is resolved. The issue was that the positional arguments to the TF loss function were in the wrong order. For the record, that is one of the issues that was mentioned on the “checklist” thread that I linked earlier in the conversation.