Add flax and friends for training neural networks
This updates our formatter, which changed what it expects very slightly.
Update all the pieces of code to match
optax is for the actual optimizers, jax is the underlying accelerated
linear algebra library, tensorflow is for loading datasets and exporting
models.
Change-Id: Ic4c3b425cda74267e1d0ad1615c42452cbefab8a
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/frc971/control_loops/python/drivetrain.py b/frc971/control_loops/python/drivetrain.py
index 1535432..f7262a7 100644
--- a/frc971/control_loops/python/drivetrain.py
+++ b/frc971/control_loops/python/drivetrain.py
@@ -664,8 +664,8 @@
max_battery_wattage = kMaxBreakerCurrent * (vbat -
kMaxBreakerCurrent * Rw)
if (max_current_request_left * max_voltage_left +
- max_current_request_right * max_voltage_right >
- max_battery_wattage):
+ max_current_request_right * max_voltage_right
+ > max_battery_wattage):
# Now solve the quadratic equation to figure out what the overall
# motor current can be which puts us at the max battery wattage.
max_motor_current = (