Error in grading of ResNets

Code Cell UNQ_C1: Function ‘identity_block’ is correct.
Code Cell UNQ_C2: Function ‘convolutional_block’ is correct.
Code Cell UNQ_C3: Unexpected error (AttributeError("‘AveragePooling2D’ object has no attribute ‘shape’")) occurred during function check. We expected function ResNet50 to return ResNet50 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.

All of the tests passed in the workbook but I am getting this error while grading, can someone please clarify why am I getting this error

It appears there is an error in your AveragePooling2D layer.
The unit tests do not catch all possible errors.