Week1 assignment_2 convolutional_model MaxPool2D issue

I’m getting this error in the second exercise of the Functional API

That means you probably put an extra comma on the end of the previous line. That has the undesirable effect of adding another dimension to the output tensor.

You have to keep track of which model you are implementing: in the Sequential API case, you need the commas, because you are building a python list. In the Functional API, you are just writing code that is getting executed “as is”, so the comma on the end has nasty side effects.

2 Likes

Thank you very much for your prompt answer.