Course 4 Week 1 Assignment 2 Assertion Error

At first I was getting an error because I attempted to pass Z1 and Z2 through the ReLU functions. I was able to solve that from a post here. Then I came across another error because I was missing (input_img) after each step in the Convultional_model function. Now I am getting this assertion error and I cannot figure out why.

[‘Conv2D’, (None, 64, 64, 8), 392, ‘same’, ‘linear’, ‘GlorotUniform’]

does not match the input value:

[‘Dense’, (None, 64, 64, 6), 24, ‘softmax’]

AssertionError Traceback (most recent call last)
in
15 [‘Dense’, (None, 6), 390, ‘softmax’]]
16
—> 17 comparator(summary(conv_model), output)

~/work/release/W1A2/test_utils.py in comparator(learner, instructor)
20 “\n\n does not match the input value: \n\n”,
21 colored(f"{a}", “red”))
—> 22 raise AssertionError(“Error in test”)
23 print(colored(“All tests passed!”, “green”))
24

AssertionError: Error in test

No, I think not. You only need (input_img) for the first Conv2D() layer. Each layer gets one data argument, and it’s often the output of the previous layer.

1 Like