This is the error I keep getting in Exercise 2 of the 2nd assignment of week 2:
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
I have no idea what I’m doing wrong. Am I missing an entire layer?
This is the code I’ve written for that block:
# UNQ_C2
# GRADED FUNCTION
def alpaca_model(image_shape=IMG_SIZE,
# mentor edit: code removed