Course 4- Week 4: Face Recognition

Hi everyone,

For some reason in this assignment I get the right output and yet an error note.

I have been working to try to find the bug but I honestly can’t find it, any ideas?

Thanks in advanced,

In this exercise, there are multiple tests. The first test is a simple one, and you had a right answer 527.2598.
Then, multiple tests with different parameters start. I think your code failed at one of these tests.
And, the error shows that you have a wrong setting for “axis”. I’m afraid that you set a fixed axis for tf.reduce_sum(). Here is the guide in your notebook.

  • Note that one way to choose the last axis in a tensor is to use negative indexing (axis=-1).

Since the input dimension may vary, specifying the last dimension with “-1” is quite useful.

Thank you very much!!

I got confused about the definition required! thanks for clarifying it!