I am getting the following error on the CNQ_C1:
“Code Cell UNQ_C1: Unexpected error (InvalidArgumentError()) occurred during function check. We expected function
grad_cam to return type <class ‘numpy.ndarray’>. Please check that this function is defined properly.
Code Cell UNQ_C2: Function ‘compute_gradcam’ is correct.”
As you can see, the subsequent function that requires the former is working correctly. The rest of the demos seem to work correctly as well and the output corresponds to the description expected by the assignment.
Based on this forum and my own work this is what I have done so far:
- made sure all of the expressions being used in the UNQ_C1 are correct (using “input_model” instead of “model”)
- tried various ways to compute the global average pooling and dot product. Currently I am just using the np.mean and np.dot functions (which seem to be the simplest to execute)
- i have restarted the assignment and also re-done it from scratch, only to get the same error. I have very few lines of code in the assignment.
I would be happy to share any of my code, however I do not want to violate community guidelines or take away from someone else’s learning experience.
thank you for your help.