Course 4, Week 4, Assignment 1 L2-Norm missing tf.sqrt()?

Hi everyone,

I’m struggeling with Course 4, Week 4, Exercise 1 and 2.

The L2-Norm contains a square root. Why is it not being used in Exercise 1 to compute the distance of anchor and positive, ancor and negative?

In ecercise 2 however I need the square root to compute the L2-Norm distance and compute the same values as shown in the unit test.

Thank you and best,

It is a good question, but I don’t know if there is a definitive answer. It looks like it’s just a choice that they made to use the L2 norm directly in the verify case. Here’s another recent thread on this topic.

It works either way, but I think using the square is more computationally efficient, so it makes more sense to use that. But they didn’t ask my opinion. :grin: