DLS Course 4 Week 2 A2 Exercise 2 alpaca_model

Getting error while building model


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)
14 def comparator(learner, instructor):
15 if len(learner) != len(instructor):
—> 16 raise AssertionError(f"The number of layers in the model is incorrect. Expected: {len(instructor)} Found: {len(learner)}")
17 for a, b in zip(learner, instructor):
18 if tuple(a) != tuple(b):

AssertionError: The number of layers in the model is incorrect. Expected: 8 Found: 7

The test report asserts that your model is 1 layer lesser than the expected model. alpaca_summary variable holds reference to the layers / shape and extra information which you can use as a guide to fix your model.