C4 W4 Face recognition assignment
the error code inside the part that I can’t fix and because this step at the beginning so grading always stop at this error:
tf.subtract()### YOU CANNOT EDIT THIS CELL
TypeError: subtract() missing 2 required positional arguments: ‘x’ and ‘y’
can anyone help me with this ?
I cant be sure unless you show the code, but in this case it usually means you need to enter two different variables. In this case I believe that you should enter two numbers in the function (e.g subtract(3,2)) to recieve an input. To summarise, i believe this functions requires two variables, i believe integers or floats, to work.
I mean I can’t access to this part it is part of unit test but it error inside it
There is no error inside it. It is just calling your code to check it. So, the error is in the code which you’ve written above this cell. Please share your full error (not code).
this is the error:
TypeError Traceback (most recent call last)
in
----> 1 tf.subtract()### YOU CANNOT EDIT THIS CELL
2
3 # BEGIN UNIT TEST
4 tf.random.set_seed(1)
5 y_true = (None, None, None) # It is not used
/opt/conda/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py in wrapper(*args, **kwargs)
199 “”“Call target, and fall back on dispatchers if there is a TypeError.”“”
200 try:
→ 201 return target(*args, **kwargs)
202 except (TypeError, ValueError):
203 # Note: convert_to_eager_tensor currently raises a ValueError, not a
TypeError: subtract() missing 2 required positional arguments: ‘x’ and ‘y’
no matter I fixed my code the error is the same I don’t know if my code is wrong or not
It seems you’ve written tf.subtract()
in this cell just before the “### YOU CANNOT EDIT THIS CELL”. You are not supposed to write anything in this cell. Just write your code in specific places where it is mentioned.
For now, remove this: tf.subtract()
from that cell.
I can’t it is unfixable
The cell should look like this:
See, there is no tf.subtract()
before the “### YOU CANNOT EDIT THIS CELL”. If you cannot edit it, try getting a clean copy of your assignment as instructed here.
thank you that help me a lot