C4 W4 Face Recognition triplet loss

The code you show looks correct to me. I’m guessing there is something structural wrong with your notebook. Have you downloaded it and modified it with other tools besides the Coursera website?

One thing to try would be to get a clean copy by using the relevant topic on the FAQ Thread. Then very carefully “copy/paste” over just your completed code and then try submitting again.