C3_W3_assignment

For Assignment 3 : Questions duplicates, I got 18 tests passed and 7 tests failed. Who could help and advise?

The error messages are pretty explicit. In the first one, you’ve used the wrong pooling function. There’s a big difference in the results of “global” average pooling versus plain vanilla average pooling. In the others, the shapes of your outputs have one more dimension than they should. That would likely be triggered by an error in the very early layers, e.g. the pooling layer or first Sequential layer being specified incorrectly.

The first rule of debugging is “believe the error message”. If you don’t understand what it is telling you, then that’s the first problem you need to solve. :nerd_face:

1 Like

Thanks. for average pooling layer, I got output shape of (None, None, 128). However, the expected output shape should be (None, 128). I had read the link again and again suggested in the assignment notebook tf.keras.layers.GlobalAveragePooling1D  |  TensorFlow v2.16.1
When I added keepdims=True


, I would get the following error.

But it looks from that new trace you show that you are still using the wrong function: you are using AveragePooling1D. The whole point of the error message is that you are supposed to be using GlobalAveragePooling1D. Those two functions do not do the same thing and do not have the same output dimensions.

1 Like

Thanks a lot! I can pass all tests now.