ValueError: Only instances of keras.Layer can be added to a Sequential model. Received: <tensorflow_hub.keras_layer.KerasLayer object at 0x7d4e252400a0> (of type <class 'tensorflow_hub.keras_layer.KerasLayer'>)
It showing this error for this code
Setup the model layers
model = tf.keras.Sequential([
hub.KerasLayer(MODEL_URL),
ValueError: Only instances of
keras.Layer
can be added to a Sequential model. Received: <tensorflow_hub.keras_layer.KerasLayer object at 0x7d4e252400a0> (of type <class 'tensorflow_hub.keras_layer.KerasLayer'>)It showing this error for this code
Setup the model layers
model = tf.keras.Sequential([ hub.KerasLayer(MODEL_URL),
Wrap hub.KerasLayer in a Lambda layer
])