Hello there,
I’ve got the following AssertionError, yet can’t really figure out, why I am lacking a layer.
AssertionError Traceback (most recent call last)
<ipython-input-83-0346cb4bf847> in <module>
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’ve followed the instruction of the layer to
# freeze the base model by making it non trainable
# create the input layer (Same as the imageNetv2 input size)
# apply data augmentation to the inputs
# data preprocessing using the same weights the model was trained on
# set training to False to avoid keeping track of statistics in the batch norm layer
# add the new Binary classification layers
# use global avg pooling to summarize the info in each channel
# include dropout with probability of 0.2 to avoid overfitting
# use a prediction layer with one neuron (as a binary classifier only needs one)
Anybody got a hint or an idea what is wrong?
Thank you.