C4W4-A2 Exercise 6 problem

Hi there,

I have passed exercise 1-5, but met a problem on exercise 6, my code and errors are as below. would you give me any suggestion?

I replaced “tf.square()” in every exercise by “**2” based on the others’ problems and replies. Then my problem was solved.

can anyone explain it? thanks!

I recommend you read the documentation for the tf.square() function.

1 Like


Let me share my lessons on this problem. The root cause is in Exercise 1 and 3. I did NOT use “tf.subtract” for tensor subtraction, instead, used “-”.