You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-16-f5bd5b09859a>](https://localhost:8080/#) in <cell line: 43>()
41
42
---> 43 model = tf.keras.Sequential([
44 tf.keras.layers.Input(shape=(224, 224, 3), batch_size=1),
45 hub.KerasLayer(MODEL_URI)
1 frames
[/usr/local/lib/python3.10/dist-packages/keras/src/models/sequential.py](https://localhost:8080/#) in add(self, layer, rebuild)
95 layer = origin_layer
96 if not isinstance(layer, Layer):
---> 97 raise ValueError(
98 "Only instances of `keras.Layer` can be "
99 f"added to a Sequential model. Received: {layer} "
ValueError: Only instances of `keras.Layer` can be added to a Sequential model. Received: <tensorflow_hub.keras_layer.KerasLayer object at 0x7b77f8034610> (of type <class 'tensorflow_hub.keras_layer.KerasLayer'>)
Describe the expected behavior
Does not crash.
What web browser you are using
Chrome.
Additional context
import tf_keras as tfk
...
model = tfk.Sequential([
tfk.layers.Input(shape=(224, 224, 3), batch_size=1),
hub.KerasLayer(MODEL_URI)
])
The above fixes the issue, it's caused by incompatible keras version.
The text was updated successfully, but these errors were encountered:
Describe the current behavior
When running https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/performance/quantization_debugger.ipynb the notebook crashes on the "Boilerplates and helpers" section.
Describe the expected behavior
Does not crash.
What web browser you are using
Chrome.
Additional context
The above fixes the issue, it's caused by incompatible keras version.
The text was updated successfully, but these errors were encountered: