Skip to content

Instantly share code, notes, and snippets.

@charlesbmi
Created December 11, 2020 04:24
Show Gist options
  • Save charlesbmi/4ecbf30a2c0663dd4677fa94bfefcbea to your computer and use it in GitHub Desktop.
Save charlesbmi/4ecbf30a2c0663dd4677fa94bfefcbea to your computer and use it in GitHub Desktop.
# Connect sub-models
x = tf.keras.Input(shape=INPUT_DIM)
code = encoder(x)
x_reconstructed = decoder(code)
next_code_pred = linear_dynamics(code)
model = tf.keras.Model(
inputs=x,
outputs={'x0_reconstructed': x_reconstructed,
'y1': next_code_pred}
)
# Plot model
tf.keras.utils.plot_model(model, expand_nested=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment