From 5ede47b88e2311f0eef5806548e4d24e2648bc74 Mon Sep 17 00:00:00 2001 From: Hongkai Dai Date: Wed, 1 Nov 2023 09:01:53 -0700 Subject: [PATCH] Fix a bug on the dimension of toy exampe (#448) --- .../test/train_toy_system_controller_demo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neural_network_lyapunov/test/train_toy_system_controller_demo.py b/neural_network_lyapunov/test/train_toy_system_controller_demo.py index c58aa3bf..b504aa81 100644 --- a/neural_network_lyapunov/test/train_toy_system_controller_demo.py +++ b/neural_network_lyapunov/test/train_toy_system_controller_demo.py @@ -82,7 +82,7 @@ dut = train_lyapunov_barrier.Trainer() dut.add_lyapunov( lyapunov_hybrid_system, V_lambda, x_equilibrium, - r_options.FixedROptions(torch.eye(2, dtype=torch.float64))) + r_options.FixedROptions(torch.eye(args.dimension, dtype=torch.float64))) dut.lyapunov_positivity_mip_pool_solutions = 1 dut.lyapunov_derivative_mip_pool_solutions = 1 dut.lyapunov_derivative_convergence_tol = 5E-5