C4 W1 Assignment 2, Exercise 2 - execution problem


Could someone help me, please? I am stuck in this part of Assignment for a few days.
Thank in advance!

I don’t have my solution code at hand for comparison, but it looks like you’re using different syntax for the P2 = … and F = … layer data arguments.

1 Like

Yes, it’s the invocation of Flatten that is incorrect. Notice that all the Layer functions are functions which return functions. So first you invoke tfl.Flatten to get the actual flatten function and then you invoke it with the appropriate argument. You’re only doing the first step which doesn’t take an argument. Compare your Flatten line to the previous MaxPool2D line and notice how the parens are different.

1 Like