commit | d264998756d0037ed009307f5bf2637c85041615 | [log] [tgz] |
---|---|---|
author | Austin Schuh <austin.linux@gmail.com> | Sat Oct 26 16:11:57 2024 -0700 |
committer | Austin Schuh <austin.linux@gmail.com> | Sat Oct 26 17:32:31 2024 -0700 |
tree | 0e1ddbef5aad18b6a3a5be52198f24143b2acb5e | |
parent | cc927bbd172e006d6a65a4249f0757a354194f80 [diff] |
Use layer norm to improve stability of the Q network Change-Id: Ica9eb446e58c74cfcdb995ad5f79faa6e137f03e Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/frc971/control_loops/swerve/velocity_controller/model.py b/frc971/control_loops/swerve/velocity_controller/model.py index 7d62b0e..acbac08 100644 --- a/frc971/control_loops/swerve/velocity_controller/model.py +++ b/frc971/control_loops/swerve/velocity_controller/model.py
@@ -175,6 +175,8 @@ name=f'denselayer{i}', features=hidden_size, )(x) + # Layernorm also improves stability. + x = nn.LayerNorm(name=f'layernorm{i}')(x) x = self.activation(x) x = nn.Dense(