MCPcopy Create free account

hub / github.com/StanfordASL/neural-network-lyapunov / functions

Functions1,470 in github.com/StanfordASL/neural-network-lyapunov

↓ 2 callersFunctionenv_fn
()
neural_network_lyapunov/examples/rl/td3.py:399
↓ 2 callersMethodeval_u
Compute u for a single state.
neural_network_lyapunov/test/test_feedback_system.py:420
↓ 2 callersMethodextract_params
(self)
neural_network_lyapunov/r_options.py:26
↓ 2 callersFunctionfind_index_set_to_strengthen
Given a point (xhat, beta_hat, y_hat), find the index set ℑ that best separates the point from the convex hull of integral solutions. Thi
neural_network_lyapunov/mip_utils.py:68
↓ 2 callersMethodgeneral_case_tester
(self, c)
neural_network_lyapunov/test/test_mip_utils.py:52
↓ 2 callersFunctiongenerate_cost_to_go_mesh
We will generate a mesh of states within a range, and evaluate the cost-to-go for each of the sampled state. @param num_samples A length
neural_network_lyapunov/test/double_integrator_control_lyapunov_demo.py:20
↓ 2 callersFunctionget_action
(o, noise_scale)
neural_network_lyapunov/examples/rl/td3.py:316
↓ 2 callersMethodget_adversarial_samples
@param TODO
neural_network_lyapunov/train_value.py:163
↓ 2 callersFunctionget_line_marker
(traj)
neural_network_lyapunov/examples/quadrotor3d/visualize_quadrotor3d.py:15
↓ 2 callersFunctionget_marker
(pos, euler, marker_id, alpha=1, is_goal=False)
neural_network_lyapunov/examples/quadrotor3d/visualize_quadrotor3d.py:33
↓ 2 callersMethodget_random_x0
@returns a Tensor between the initial state bounds of the training
neural_network_lyapunov/train_value.py:117
↓ 2 callersFunctionget_simple_ca_system_params
(dtype=torch.float64)
neural_network_lyapunov/test/test_control_affine_system.py:12
↓ 2 callersMethodgradient
Compute the gradient of the dynamics through autodiff.
neural_network_lyapunov/examples/pole/pole.py:115
↓ 2 callersMethodgrow_tree
(self, max_nodes)
neural_network_lyapunov/examples/car/rrt_star.py:223
↓ 2 callersFunctionis_polyhedron_bounded
Returns true if the polyhedron P*x<=q is bounded. Assuming that P*x<=q is non-empty, then P*x <= q being bounded is equivalent to 0 being
neural_network_lyapunov/utils.py:716
↓ 2 callersMethodkinetic_energy
(self, x)
neural_network_lyapunov/examples/pendulum/pendulum.py:44
↓ 2 callersMethodlayers_output_shape
compute the output size of a list of layers, given an input image @param conv list of torch layers (like nn.Conv2d) @return t
neural_network_lyapunov/encoders.py:29
↓ 2 callersMethodliftoff_to_apex_gradient
Given the state right after lifting off the ground, compute the gradient of the next apex state w.r.t the post lo state. The apex
neural_network_lyapunov/spring_loaded_inverted_pendulum.py:483
↓ 2 callersMethodliftoff_transition_gradient
Compute the gradient of the lifoff transition function w.r.t the pre lo state. @param pre_lo_state The SLIP state just prior
neural_network_lyapunov/spring_loaded_inverted_pendulum.py:557
↓ 2 callersMethodlinear_output_tester
(self, dut, layer_index, linear_output_row_index, previous_neuron_input_lo,
neural_network_lyapunov/test/test_relu_to_optimization.py:1405
↓ 2 callersMethodlyapunov_derivative
Compute V̇(x) + εV(x) Due to the non-uniqueness of the gradient dV/dx, there might be multiple V̇(x) + εV(x). We return a lis
neural_network_lyapunov/continuous_time_lyapunov.py:44
↓ 2 callersMethodlyapunov_derivative_as_milp2
We assume that the Lyapunov function V(x) = ReLU(x) - ReLU(x*) + λ|x-x*|₁, where x* is the equilibrium state. Formula
neural_network_lyapunov/continuous_time_lyapunov.py:780
↓ 2 callersMethodlyapunov_derivative_as_milp_check_state
(self, system, x_equilibrium, relu, V_lambda, dV_epsilon,
neural_network_lyapunov/test/test_lyapunov.py:1004
↓ 2 callersMethodlyapunov_gradient_batch_tester
(self, dut, x_equilibrium, V_lambda, R, create_graph)
neural_network_lyapunov/test/test_lyapunov.py:727
↓ 2 callersMethodmixed_integer_constraints
@return mixed-integer linear constraints MixedIntegerConstraintsReturn Ain_x, Ain_u, Ain_s, Ain_gamma, rhs_in,
neural_network_lyapunov/relu_system.py:454
↓ 2 callersFunctionmlp
(sizes, activation, output_activation=nn.Identity)
neural_network_lyapunov/examples/rl/td3.py:23
↓ 2 callersMethodmode_derivative_bounds
Return the bounds on Aᵢx s.t Pᵢx ≤ qᵢ @param mode_index The mode index i @return (lower, upper) The lower and upper bounds on
neural_network_lyapunov/hybrid_linear_system.py:647
↓ 2 callersMethodnetwork_tester
(self, relu_network)
neural_network_lyapunov/test/test_relu_to_optimization.py:1631
↓ 2 callersMethodnonunique_gradient_tester
(self, zero_tol)
neural_network_lyapunov/test/test_utils.py:1126
↓ 2 callersMethodoutput_gradient_times_vector_w_bounds
We want to compute the gradient of the network ∂ReLU(x)/∂x times a vector y: ∂ReLU(x)/∂x * y, and reformulate this product as
neural_network_lyapunov/relu_to_optimization.py:1065
↓ 2 callersFunctionplot_relu
(relu, system, V_lambda, x_equilibrium)
neural_network_lyapunov/test/train_discrete_1d_lyapunov.py:45
↓ 2 callersMethodpossible_dx
(self, x, u)
neural_network_lyapunov/relu_system.py:481
↓ 2 callersMethodpotential_energy
(self, x)
neural_network_lyapunov/examples/pendulum/pendulum.py:37
↓ 2 callersMethodprint
Print the settings of this training device.
neural_network_lyapunov/train_lyapunov_barrier.py:859
↓ 2 callersMethodremove_binary_relaxation
Loop through all the variables in self.zeta, if the variable is not registered as a binary variable in gurobi, then set its vtype to
neural_network_lyapunov/gurobi_torch_mip.py:1035
↓ 2 callersMethodreparam
gets a sample in latent space @param z_mu tensor mean of the samples @param z_log_var tensor log of the variance of the sampl
neural_network_lyapunov/dynamics_learning.py:706
↓ 2 callersFunctionrotation_matrix
(theta)
neural_network_lyapunov/examples/pendulum/train_pendulum_demo.py:16
↓ 2 callersMethodsetObjective
Set the objective. The objective is ∑ᵢ quad_variables[i][0]ᵀ * quad_coeffs[i] * quad_variables[i][1] + ∑ᵢ lin_coeffs[
neural_network_lyapunov/gurobi_torch_mip.py:1164
↓ 2 callersMethodset_options
(self, options_dict)
neural_network_lyapunov/dynamics_learning.py:25
↓ 2 callersFunctionsetup_johansson_continuous_time_system1
This is the simple example from section 3 of Computation of piecewise quadratic Lyapunov functions for hybrid systems by M. Johansson and
neural_network_lyapunov/test/test_hybrid_linear_system.py:138
↓ 2 callersFunctionsetup_relu
(relu_layer_width, params)
neural_network_lyapunov/test/test_train_utils.py:9
↓ 2 callersFunctionsetup_relu_dyn
(dtype, params=None)
neural_network_lyapunov/test/test_lyapunov.py:106
↓ 2 callersFunctionsetup_relu_feedback_system_and_lyapunov
(dtype)
neural_network_lyapunov/test/test_lyapunov.py:197
↓ 2 callersFunctionsetup_state_samples_all
(mesh_size)
neural_network_lyapunov/test/test_train_lyapunov_barrier.py:38
↓ 2 callersFunctionsetup_transformed_trecate_system
In paper "Analysis of discrete-time piecewise affine and hybrid systems" by Giancarlo Ferrari-Trecate et.al. the authors define a piecewise a
neural_network_lyapunov/test/test_hybrid_linear_system.py:41
↓ 2 callersMethodsimulate
Simulate the SLIP model from an intial state x0 in the flight phase. In the i'th flight phase, the leg angle theta is fixed to theta_
neural_network_lyapunov/spring_loaded_inverted_pendulum.py:212
↓ 2 callersMethodsolve_barrier_derivative_mip
(self)
neural_network_lyapunov/train_lyapunov_barrier.py:559
↓ 2 callersMethodspecial_cases_tester
(self, c)
neural_network_lyapunov/test/test_mip_utils.py:15
↓ 2 callersFunctionstack_rhs
(rhs1, rhs2)
neural_network_lyapunov/gurobi_torch_mip.py:175
↓ 2 callersMethodstance_dynamics_gradient
Compute the gradient of the stance dynamics function w.r.t the state. @param x The state in the stance phase. @return dxdot_d
neural_network_lyapunov/spring_loaded_inverted_pendulum.py:393
↓ 2 callersMethodstep
(self, closure, loss0)
neural_network_lyapunov/line_search_adam.py:186
↓ 2 callersMethodstep_direction
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
neural_network_lyapunov/line_search_adam.py:114
↓ 2 callersMethodstep_forward_tester
(self, dut)
neural_network_lyapunov/test/test_relu_system.py:778
↓ 2 callersMethodstep_forward_tester
(self, dut)
neural_network_lyapunov/test/test_relu_system.py:870
↓ 2 callersMethodstep_forward_tester
(self, dut)
neural_network_lyapunov/examples/car/test/test_unicycle.py:138
↓ 2 callersMethodstep_forward_tester
(self, dut)
neural_network_lyapunov/examples/car/test/test_unicycle.py:289
↓ 2 callersMethodstrengthen_controller_mip_constraint
Given the variables x_var, controller_slack, controller_binary (and the value of these variables stored inside x_var, controller_slac
neural_network_lyapunov/feedback_system.py:304
↓ 2 callersMethodstrengthen_dynamics_constraint
Strengthen the MIP constraint on system dynamics. For ReLU network, we can strengthen its MIP constraint (derived from big-M
neural_network_lyapunov/feedback_system.py:380
↓ 2 callersMethodstrengthen_lyapunov_derivative_as_milp_tester
(self, dut, V_lambda, deriv_eps, eps_type, R,
neural_network_lyapunov/test/test_lyapunov.py:1491
↓ 2 callersMethodstrengthen_lyapunov_derivative_milp_binary
Given an MILP that verifies the Lyapunov derivative condition, we want to strengthen this MILP formulation, by putting constraints on
neural_network_lyapunov/lyapunov.py:784
↓ 2 callersMethodstrengthen_mip_at_point_tester
1. First formulate an LP relaxation of the MIP for the network. 2. Solve this LP relaxation. Make sure the solution is non-integral.
neural_network_lyapunov/test/test_relu_to_optimization.py:1001
↓ 2 callersFunctionthreeD_to_flat
(i0, i1, i2)
neural_network_lyapunov/examples/car/value_iteration.py:205
↓ 2 callersMethodtotal_loss_tester
(self, lyap, R, training_params, state_samples)
neural_network_lyapunov/test/test_train_feedback_system.py:356
↓ 2 callersMethodtouchdown_guard
The touch down happens in the flight phase when the guard y - l0*cosθ crosses zero from above.
neural_network_lyapunov/spring_loaded_inverted_pendulum.py:66
↓ 2 callersMethodtouchdown_to_liftoff_gradient
The math is explained in doc/linear_slip.tex Given a state right after touchdown, compute the gradient of the map from the po
neural_network_lyapunov/spring_loaded_inverted_pendulum.py:414
↓ 2 callersMethodtouchdown_transition_gradient
Compute the gradient of the touchdown transition function w.r.t the pre touchdown state and the leg angle. @param pre_td_stat
neural_network_lyapunov/spring_loaded_inverted_pendulum.py:525
↓ 2 callersMethodtransform_input_tester
(self, dut, x_eq)
neural_network_lyapunov/test/test_gurobi_torch_mip.py:77
↓ 1 callersFunctionComputeReLUActivationPattern
For a given input x to a ReLU (including leaky ReLU) network, returns the activation pattern for this input. @param model_relu A ReLU net
neural_network_lyapunov/relu_to_optimization.py:17
↓ 1 callersMethodG
The dynamics is ẋ=f(x)+G(x)u
neural_network_lyapunov/control_affine_system.py:99
↓ 1 callersMethodG
(self, x)
neural_network_lyapunov/control_affine_system.py:139
↓ 1 callersMethod__compute_Ai_times_x_bounds
(self, mode_index)
neural_network_lyapunov/hybrid_linear_system.py:629
↓ 1 callersMethod__init__
Args: system: A continuous-time dynamical system. lyapunov_relu: The network ϕ(x) used in the Lyapunov function V(x).
neural_network_lyapunov/continuous_time_lyapunov.py:35
↓ 1 callersMethod__init__
Args: system: The dynamical system. barrier_relu: ϕ(x) in the class documentation.
neural_network_lyapunov/barrier.py:43
↓ 1 callersMethod__init__
@param system A AutonomousHybridLinearSystem or AutonomousReLUSystem instance. @param lyapunov_relu A ReLU network used to re
neural_network_lyapunov/lyapunov.py:40
↓ 1 callersMethod__init__
@param x_lo The lower bound of x[n] and x[n+1]. This is only used in forming the mixed-integer linear constraints. @param x_u
neural_network_lyapunov/relu_system.py:413
↓ 1 callersMethod__init__
(self, dtype)
neural_network_lyapunov/examples/car/unicycle.py:20
↓ 1 callersMethod__init__
(self)
neural_network_lyapunov/examples/rocket/rocket.py:11
↓ 1 callersMethod_add_dynamics_constraint_given_relu_bounds
( self, mip, x_var, x_next_var, u_var, slack_var_name, binary_var_name, relu_input_lo,
neural_network_lyapunov/examples/quadrotor3d/quadrotor.py:474
↓ 1 callersMethod_add_goal
(self, x_goal: np.ndarray)
neural_network_lyapunov/examples/car/rrt_star.py:66
↓ 1 callersMethod_batch_descent_on_samples
Give the samples, divide the samples to small batches, and run several epochs to reduce the loss on the sampled states.
neural_network_lyapunov/train_lyapunov_barrier.py:1136
↓ 1 callersFunction_compute_beta_range
Compute the range of beta_hat, such that max(c(w'*xhat+b), w'*xhat+b) <= min(x_coeffs*xhat + binary_coeffs*beta_hat+constants). A
neural_network_lyapunov/mip_utils.py:165
↓ 1 callersMethod_construct_milp_for_roa_boundary
Construct an MILP to solve the problem min V(x) s.t x in the boundary of the box.
neural_network_lyapunov/lyapunov.py:408
↓ 1 callersMethod_create_feedback_hybrid_system
(self)
neural_network_lyapunov/test/test_train_feedback_system.py:46
↓ 1 callersMethod_create_feedback_second_order_system
(self)
neural_network_lyapunov/test/test_train_feedback_system.py:84
↓ 1 callersMethod_create_linear_feedback_second_order_system
(self)
neural_network_lyapunov/test/test_train_feedback_system.py:141
↓ 1 callersFunction_get_linear_input_vertices
For the region lo <= x <= up relu_input_lo <= w*x+b <= relu_input_up return all the vertices of the box lo <= x <= up if the vertex a
neural_network_lyapunov/mip_utils.py:130
↓ 1 callersMethod_mixed_integer_constraints_v
Return the mixed-integer constraints on a(x) and b(x).reshape((-1,)).
neural_network_lyapunov/control_affine_system.py:170
↓ 1 callersMethod_mixed_integer_constraints_v
(self)
neural_network_lyapunov/control_affine_system.py:277
↓ 1 callersMethod_save_network
(self, iter_count)
neural_network_lyapunov/train_lyapunov_barrier.py:846
↓ 1 callersMethod_set_training_params
@params is returned from _get_current_training_params()
neural_network_lyapunov/train_lyapunov_barrier.py:1123
↓ 1 callersMethoda
(self, x)
neural_network_lyapunov/control_affine_system.py:156
↓ 1 callersMethoda
(self, x)
neural_network_lyapunov/control_affine_system.py:271
↓ 1 callersMethodadd_dl1dx_times_xdot_tester
(self, dut, V_lambda, R, x_equilibrium)
neural_network_lyapunov/test/test_continuous_time_lyapunov.py:222
↓ 1 callersMethodadd_dynamics_constraint
( self, mip, x_var, x_next_var, u_var, slack_var_name,
neural_network_lyapunov/examples/pendulum/pendulum.py:225
↓ 1 callersMethodadd_dynamics_constraint
(self, mip: gurobi_torch_mip.GurobiTorchMIP, x
neural_network_lyapunov/examples/pole/pole_relu_system.py:89
↓ 1 callersMethodadd_dynamics_constraint
Add the dynamics constraints pos[n+1] = pos[n] + (pos_dot[n] + pos_dot[n+1]) / 2 * dt (rpy[n+1], pos_dot[n+1] - pos_dot[n], a
neural_network_lyapunov/examples/quadrotor3d/quadrotor.py:528
↓ 1 callersMethodadd_dynamics_constraint
( self, mip, x_var, x_next_var, u_var, slack_var_name,
neural_network_lyapunov/examples/quadrotor2d/quadrotor_2d.py:292
↓ 1 callersMethodadd_grad
(self, p, t, d_p)
neural_network_lyapunov/line_search_gd.py:97
↓ 1 callersMethodadd_grad
(self, p, t, d_p)
neural_network_lyapunov/line_search_adam.py:74
↓ 1 callersMethodadd_mip_constraint_tester
Test _add_constraint_to_program_by_layer with binary_var_type=BINARY
neural_network_lyapunov/test/test_relu_to_optimization_utils.py:409
← previousnext →301–400 of 1,470, ranked by callers