Created
December 11, 2020 19:09
-
-
Save charlesbmi/0e778e16f6d652454dc32bfc547595fd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# 1. Reconstruction loss: x0 = x0_recon | |
reconstruction_loss = tf.keras.losses.mean_squared_error(x0, x0_reconstructed) | |
model.add_loss(reconstruction_loss) | |
# 2. Future state prediction loss: x1 = x1_pred | |
state_prediction_loss = tf.keras.losses.mean_squared_error(x1, x1_pred) | |
model.add_loss(state_prediction_loss) | |
# 3. Linear dynamics loss: y1 = K * y0 | |
linear_dynamics_loss = tf.keras.losses.mean_squared_error(code1, code1_pred) | |
model.add_loss(linear_dynamics_loss) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment