the answer in cweek 1 part 2 assignment part 2 portion the answer as seem to be there is wrong as compared to follpwing all steps mentioned. Please enlighten if it isn’t. If you request I can send my code as well
Please post a screen capture image that shows the issue.
As per your request sir sorry for the delay. I am sending you my code and its output which is mentioning the test failed and moreover the code is by my knowledge is writeen as coreect as told to me by the comments for the assignment.
Please have a look and give advice if possible.
Thanking You
Georghus
{moderator edit - solution code removed}
Your first Conv2D layer looks correct, but the ReLU and MaxPool layers after that are wrong: you do not pass them an input tensor. Here in this section we are doing the “Functional API”, right? It requires that you make two calls on each line: the first call is to the layer function to set the parameters and then you call the returned “instantiation” of the function with an input tensor. So looking at your code the variables A1 and P1 contain functions not tensors.
Here’s a thread from a fellow student that gives more explanation about how the Sequential and Functional APIs work.
There are plenty more mistakes further down. You make the same error with the later ReLU and Pooling layers. In the second Conv layer, why do you use the original input image as the input there? That means you are ignoring the results of the previous layers. Each layer in the sequence needs to take the output of the previous layer as input. That’s how the layers of a neural network are put together, right?