AssertionError: Error in test

I am getting an error in the second assignment of week 2 of the course.

Here’s the code:

from test_utils import summary, comparator

alpaca_summary = [[‘InputLayer’, [(None, 160, 160, 3)], 0],
[‘Sequential’, (None, 160, 160, 3), 0],
[‘TensorFlowOpLayer’, [(None, 160, 160, 3)], 0],
[‘TensorFlowOpLayer’, [(None, 160, 160, 3)], 0],
[‘Functional’, (None, 5, 5, 1280), 2257984],
[‘GlobalAveragePooling2D’, (None, 1280), 0],
[‘Dropout’, (None, 1280), 0, 0.2],
[‘Dense’, (None, 1), 1281, ‘linear’]] #linear is the default activation

comparator(summary(model2), alpaca_summary)

for layer in summary(model2):
print(layer)

Output:

Test failed
Expected value

[‘Sequential’, (None, 160, 160, 3), 0]

does not match the input value:

[‘TensorFlowOpLayer’, [(None, 160, 160, 3)], 0]

AssertionError Traceback (most recent call last)
in
10 [‘Dense’, (None, 1), 1281, ‘linear’]] #linear is the default activation
11
—> 12 comparator(summary(model2), alpaca_summary)
13
14 for layer in summary(model2):

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

AssertionError: Error in test

You have shared the code of the test cell by mistake. Can you please share the code of the Alpaca model instead, so that we can find the error. And make sure to remove the code once your query is resolved.

Oh, I found the error.
Thanks for your time,.

Hi…i face similar problem,cant figure it out…what could be the?please help…

1 Like

hi…how did you solve it?

1 Like

Anyone can help lol? Been stuck with this for a while

1 Like

How did you solve the error?