Exercise error messages (Convolution_model_Application)

Please can someone help me with these error messages that are popping up on my notebook?

Both are from the exercise (Convolution_model_Application), in the def HappyModel() function:

From exercise 1:
Exercise 1 - happyModel
Implement the happyModel function below to build the following model: ZEROPAD2D → CONV2D → BATCHNORM → RELU → MAXPOOL → FLATTEN → DENSE. Take help from tf.keras.layers

Also, plug in the following parameters for all the steps:

ZeroPadding2D: padding 3, input shape 64 x 64 x 3
Conv2D: Use 32 7x7 filters, stride 1
BatchNormalization: for axis 3
MaxPool2D: Using default parameters
Flatten the previous output.
Fully-connected (Dense) layer: Apply a fully connected layer with 1 neuron and a sigmoid activation.

Use tfl as shorthand for tensorflow.keras.layers

Voilà…In the first error I have already identified the cause. It was a comma in the previous paragraph.

For the other errors, try resetting the kernel, then re-run all of the cells above the one you’re working on.

1 Like

I don’t understand, I restarted the Kernel, but contrary to what I expected, other errors appeared.

It is a mistake to be using the data_format argument to the Conv2D layer. Use input_shape, but even that is probably not required. It’s not described in the documentation for the specific layer functions, but it is inherited from the Model class.

1 Like

Everything worked out mentor, thank you. But as I progress, more errors appear.

You have misspelled the name of the Conv layer. It is Conv2D, not ConvD2.

1 Like

Yeah… Once again thank you very much mentor. These exercises tend to be frustrating and tiring, but with the right amount of support from the students, we are able to overcome the difficulties and move on to the next exercises.

After a lot of trial and error, and the surgical and punctual help, we go to week 2.