Week4 VGG assignment


I’ve finished the VGG assignment and successfully passed all the test cases. However, when attempting to train a cat vs. dog classifier using the same VGG network, I encountered an AttributeError: ‘MaxPooling2D’ object has no attribute ‘shape.’ Can anyone assist me in resolving this error?. Please find the error message’s screenshot below.

Well, are you trying to access the shape method of the maxpooling2d layers at all?

Hello Mohd_Parvez,

Did you go through this link mentioned in the assignment section of Create VGG network under MaxPool2D, which would tell you to add parameters of pool_size and stride.

The screenshot you shared it is an incomplete one as at the beginning it shows a error metadata.

So kindly if you have recalled MaxPool2D correctly with the parameters mentioned, then kindly get a fresh copy, try to do assignment again. Make sure you have read all the instructions where it shows you to uncomment some of the codes.

If you are still encountering the issue, let us know.


Hello Gent,

are you also getting notification for each post threads related to tf3? This used to not happen earlier right? Is this a new change?


Hi Deepti,

Yes I am getting those notifications actually, I think its a new feature now, maybe it can be changed from the settings! Let me see.

Take care.


Actually tagging mentor is by the post creator, and that’s when we are getting the notification

Is that so? Hmm