it told me that
Code Cell UNQ_C1: Unexpected error (TypeError(“‘axis’ is an invalid keyword argument for max()”)) occurred during function check. We expected function yolo_filter_boxes
to return yolo_filter_boxes test 1 failed. Please check that this function is defined properly.
Code Cell UNQ_C2: Unexpected error (TypeError(“ufunc ‘isfinite’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ‘‘safe’’”)) occurred during function check. We expected function iou
to return iou test 1 failed. Please check that this function is defined properly.
Code Cell UNQ_C3: Unexpected error (AttributeError(“‘NoneType’ object has no attribute ‘shape’”)) occurred during function check. We expected function yolo_non_max_suppression
to return yolo_non_max_suppression test 1 failed. Please check that this function is defined properly.
Code Cell UNQ_C4: Unexpected error (TypeError(‘cannot unpack non-iterable NoneType object’)) occurred during function check. We expected function yolo_eval
to return yolo_eval test 1 failed. Please check that this function is defined properly.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.
Did you change the name of the notebook?
no,it still called W3A1/Autonomous_driving_application_Car_detection.ipynb
Sounds like there may be some errors in the first two functions, and maybe the others are incomplete.
what i shloud do then
I am currently on holiday, so do not have access to my solutions.
Maybe another mentor will help.
Have you added any extra cells or removed the ungraded cells (or changed its code)? Or changed the sequence of cells?
From that first error message, one theory is that you are using the python “max()” function somewhere instead of one of the TF functions like tf.argmax or tf.reduce_max to compute the maximum. The argument axis would be accepted by the TF functions.
If that clue doesn’t help then we’ll need to look at your code, but that needs to happen using the private DM channel instead of sharing it here on a public thread.
well,what i use is the tf function
I think that the axis parameter is a keyword parameter, not a positional parameter for those two TF functions.
What is the message you see now in “Show grader output”?
still
Code Cell UNQ_C1: Unexpected error (TypeError(“‘axis’ is an invalid keyword argument for max()”)) occurred during function check. We expected function yolo_filter_boxes
to return yolo_filter_boxes test 1 failed. Please check that this function is defined properly.
Code Cell UNQ_C2: Unexpected error (TypeError(“ufunc ‘isfinite’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ‘‘safe’’”)) occurred during function check. We expected function iou
to return iou test 1 failed. Please check that this function is defined properly.
Code Cell UNQ_C3: Unexpected error (AttributeError(“‘NoneType’ object has no attribute ‘shape’”)) occurred during function check. We expected function yolo_non_max_suppression
to return yolo_non_max_suppression test 1 failed. Please check that this function is defined properly.
Code Cell UNQ_C4: Unexpected error (TypeError(‘cannot unpack non-iterable NoneType object’)) occurred during function check. We expected function yolo_eval
to return yolo_eval test 1 failed. Please check that this function is defined properly.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.
OK. Let’s check your code one by one. First, send me your code of the yolo_filter_boxes
function in a private message. Click my name and message.
my (admittedly old version of the) notebook says explicitly…
-
-
- use
keras.argmax
. Similarly, usekeras.max
.
- use
-
Just sayin
In your yolo_filter_boxes() code, do you use a “max(…)” function anywhere?
You should use argmax(…) and reduce_max(…), but never a simple “max(…)” function.
Note that the current version of the notebook does not say to use keras.argmax(…).
Right, I implemented those two lines exactly the revised way shown above after adding the axis keyword parameter.
Maybe it’s time to take a look at the code, but we need to do that in a private channel. @wgl, please check your DMs for a message about how to do that.
thank you everyone,by the help of [saifkhanengr] the problem soluted