Hi Team,
I am stuck with below error while trying train the top layers of a base model.
I am getting an Assertion error saying “The number of layers in the model is incorrect. Expected: 8 Found: 7”. When I try to inspect the layers of the alpaca model, it is missing “Sequential” layer.
model2.summary()
Model: “functional_5”
Layer (type) Output Shape Param #
input_15 (InputLayer) [(None, 160, 160, 3)] 0
tf_op_layer_RealDiv_2 (Tenso [(None, 160, 160, 3)] 0
tf_op_layer_Sub_2 (TensorFlo [(None, 160, 160, 3)] 0
mobilenetv2_1.00_160 (Functi (None, 5, 5, 1280) 2257984
global_average_pooling2d_5 ( (None, 1280) 0
dropout_2 (Dropout) (None, 1280) 0
dense_2 (Dense) (None, 1) 1281
Total params: 2,259,265
Trainable params: 1,281
Non-trainable params: 2,257,984
I am just using the data_augmenter() function as is. It should have the sequential model created and returned as a output and passing the “inputs” as an input to this model. Still it is not added to the layers. Please let me know what am I missing here.