My model is defined as such:
model = keras.models.Sequential()
model.add(layers.Embedding(max_features, 128, input_length=max_len,
in
It happened to me after upgrading Keras
check this link: https://github.com/keras-team/keras/issues/10638
In keras/engine/sequential.py
Comment this out:
@property
def layers(self):
# Historically, `sequential.layers` only returns layers that were added
# via `add`, and omits the auto-generated `InputLayer`
# that comes at the bottom of the stack.
if self._layers and isinstance(self._layers[0], InputLayer):
return self._layers[1:]
return self._layers