ERROR alternate way to add dense layers to pretrained model


[code removed - moderator]

after that below ,rather than creating a variable x and adding the layers to it, i am using the previous original way to add layers to the pretrained model

[code removed - moderator]

but i am getting the error The added layer must be an instance of class Layer.

This line is the problem


Please don’t mix functional and sequential layer styles.
Sequential accepts a list of layers.
Functional style calls the current layer with previous layer as parameter.