Created
December 14, 2020 17:51
-
-
Save Sirsirious/8a443a099f69d304e6e585ae41ce3fdf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a full Keras model using the layer you loaded from trax. | |
inputs = tf.keras.Input(shape=(None,), dtype='int32') | |
# Use default Keras syntax to link an input to the layer | |
hidden = keras_layer(inputs) | |
# Get the outputs from the trax-loaded layer | |
outputs = hidden | |
# Finally, wrap everything with a Keras Model | |
keras_model = tf.keras.Model(inputs=inputs, outputs=outputs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment