Huy I am facing this error in my assignment and I am unable to understand it if anyone could assist me it would be really helpful thanks this is in exercise 1 of this assignment.
happy_model = happyModel()
Print a summary for each layer
for layer in summary(happy_model):
print(layer)
output = [[‘ZeroPadding2D’, (None, 70, 70, 3), 0, ((3, 3), (3, 3))],
[‘Conv2D’, (None, 64, 64, 32), 4736, ‘valid’, ‘linear’, ‘GlorotUniform’],
[‘BatchNormalization’, (None, 64, 64, 32), 128],
[‘ReLU’, (None, 64, 64, 32), 0],
[‘MaxPooling2D’, (None, 32, 32, 32), 0, (2, 2), (2, 2), ‘valid’],
[‘Flatten’, (None, 32768), 0],
[‘Dense’, (None, 1), 32769, ‘sigmoid’]]
comparator(summary(happy_model), output)
When I run the above block the error is as follows.
Test failed
Expected value
[‘ReLU’, (None, 64, 64, 32), 0]
does not match the input value:
[‘Activation’, (None, 64, 64, 32), 0]
AssertionError Traceback (most recent call last)
in
12 [‘Dense’, (None, 1), 32769, ‘sigmoid’]]
13
—> 14 comparator(summary(happy_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