Course 4, Week 1, assignment 2, Functional API Error

Happy model as a sequential model worked fine. However during exercise 2: convolutional model with Functional API, I get error in my first ReLU layer:

No matter what I do, it does not work. Please help :confused:

Your syntax for the ReLU layer is incorrect.
It’s “ReLU()(Z)”

  • The ReLU() creates the layer object.
  • The (Z) passes data to it.

It’s two statements jammed into one line of code.

Your lines 40, 42, and 43 all do it correctly. Only your line 41 has the error.

1 Like

Thank you so much! My mistake!