Open
Description
Discussed in #662
Originally posted by moatednorth July 31, 2024
Sequential api can't handle hub.KerasLayer
`
Create a Keras Layer using the USE pretrained layer from Kaggle
sentence_encoder_layer = hub.KerasLayer("https://www.kaggle.com/models/google/universal-sentence-encoder/TensorFlow2/universal-sentence-encoder/2",
input_shape=[],
dtype=tf.string,
trainable=False,
name="USE")
Create model using the Sequential API
model_6 = tf.keras.Sequential([
sentence_encoder_layer,
layers.Dense(64, activation="relu"),
layers.Dense(1, activation="sigmoid", name="ouput_layer")
], name="model_6_USE")
`
Metadata
Metadata
Assignees
Labels
No labels