MCPcopy Create free account

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

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

↓ 1 callersMethodadversarial_samples
computes states the lead to violations of the lyapunov conditions @return z_adv_pos tensor [num_samples, x/z_dim] where the lyapunov
neural_network_lyapunov/dynamics_learning.py:103
↓ 1 callersMethodapex_guard
The apex happens when ydot crosses zero from above.
neural_network_lyapunov/spring_loaded_inverted_pendulum.py:82
↓ 1 callersMethodapex_map_linear_approximation
Given the apex state [x;z;ẋ], and the leg angle, find the linear approximation of the apex-to-apex return map. Notice that here in t
neural_network_lyapunov/slip_hybrid_linear_system.py:25
↓ 1 callersMethodb
(self, x)
neural_network_lyapunov/control_affine_system.py:159
↓ 1 callersMethodb
(self, x)
neural_network_lyapunov/control_affine_system.py:274
↓ 1 callersMethodbound_tester
(self, relu_network, x_lo, x_up, method)
neural_network_lyapunov/test/test_relu_to_optimization.py:1593
↓ 1 callersFunctioncalculate_plate_position
(plant_robot, plate_position, plate_rotation)
neural_network_lyapunov/examples/pole/simulation/pole_balancing_sim.py:134
↓ 1 callersFunctioncalculate_r_complete
@return: r: numpy array of size (nx, nx). immediate cost from state x to x'. u_optimal: numpy array of size (nx, nx, u_dim). u[i, j] is t
neural_network_lyapunov/examples/car/value_iteration.py:72
↓ 1 callersFunctioncalculate_r_duplicate
@return: r: numpy array of size (nx, nx). immediate cost from state x to x'. u_optimal: numpy array of size (nx, nx, u_dim). u[i, j] is t
neural_network_lyapunov/examples/car/value_iteration.py:120
↓ 1 callersMethodcheck_gradient
(self, dphi_dx, dphi_dx_expected)
neural_network_lyapunov/test/test_utils.py:1114
↓ 1 callersMethodcompute_Wz_bounds_optimization_tester
(self, dut, x_lo, x_up, A, b)
neural_network_lyapunov/test/test_relu_to_optimization.py:825
↓ 1 callersMethodcompute_barrier_loss
(self, safe_state_samples, unsafe_state_samples, derivative_state_samples, safe_s
neural_network_lyapunov/train_lyapunov_barrier.py:626
↓ 1 callersFunctioncompute_continuous_time_system_cost_to_go
Compute the cost-to-go for a continuous time piecewise affine system. The cost-to-go is defined as V(x) = ∫ᵀ₀ cost(x(t))dt We will fi
neural_network_lyapunov/hybrid_linear_system.py:713
↓ 1 callersFunctioncompute_discrete_time_system_cost_to_go
Compute the cost-to-go ∑ᵢ c(x[i]) starting from x_start for the discrete-time system. If the trajectory of x reaches x_goal, or after sim
neural_network_lyapunov/hybrid_linear_system.py:659
↓ 1 callersFunctioncompute_loss_pi
(data)
neural_network_lyapunov/examples/rl/td3.py:272
↓ 1 callersFunctioncompute_loss_q
(data)
neural_network_lyapunov/examples/rl/td3.py:237
↓ 1 callersMethodcompute_lyapunov_derivative_loss_at_samples
(self, dut, state_samples, V_lambda, epsilon,
neural_network_lyapunov/test/test_train_feedback_system.py:241
↓ 1 callersMethodcompute_lyapunov_positivity_loss_at_samples
(self, dut, state_samples, V_lambda, epsilon, margin,
neural_network_lyapunov/test/test_train_feedback_system.py:191
↓ 1 callersFunctioncompute_optical_flow_control
A simple controller mimicking optical flow controller to avoid obstacles. Assume field of view [0,pi/2) Make control decisions only based
neural_network_lyapunov/examples/car/car.py:14
↓ 1 callersFunctioncompute_optical_flow_control_goal
Driving to the goal position while avoiding obstacles. Assume field of view [0,pi/2). Make control decisions only based on views in the f
neural_network_lyapunov/examples/car/car.py:42
↓ 1 callersMethodcompute_optimal_cost_lyapunov_derivative_as_milp
( self, system, relu, x_equilibrium, V_lambda, dV_epsilon, eps_type, R)
neural_network_lyapunov/test/test_lyapunov.py:1069
↓ 1 callersFunctioncompute_output_gradient_times_vec_intermediate
Compute z and Wz defined in output_gradient_times_vector() function. Notice that when the relu network input is 0, we use only the right
neural_network_lyapunov/test/test_relu_to_optimization.py:13
↓ 1 callersFunctionconstruct_training_set
()
neural_network_lyapunov/examples/car/unicycle_traj_opt.py:66
↓ 1 callersFunctionconstruct_traj_opt
Construct a trajectory optimization problem to find the minimal time to reach the goal position. The user should adjusts initial_val_constrai
neural_network_lyapunov/examples/car/unicycle_traj_opt.py:39
↓ 1 callersFunctioncontroller
(x)
neural_network_lyapunov/examples/pole/learn_relu_dynamics.py:27
↓ 1 callersMethodcontroller_variables
(self)
neural_network_lyapunov/feedback_system.py:474
↓ 1 callersFunctionconverged
(t, y)
neural_network_lyapunov/examples/pendulum/train_pendulum_demo.py:47
↓ 1 callersFunctioncost
(nT, ut)
neural_network_lyapunov/examples/car/unicycle_traj_opt.py:34
↓ 1 callersFunctioncreate_hybrid_system1
(dtype)
neural_network_lyapunov/test/test_train_feedback_system.py:18
↓ 1 callersFunctioncreate_iiwa_controller_plant
Creates plant that includes only the robot, used for controllers. :param gravity: :return:
neural_network_lyapunov/examples/pole/simulation/pole_balancing_sim.py:171
↓ 1 callersFunctioncreate_system
(dtype)
neural_network_lyapunov/test/synthesize_controller_hybrid_system_demo.py:12
↓ 1 callersFunctiondelta_cost_trajectory
(nT, ut)
neural_network_lyapunov/examples/car/unicycle_traj_opt.py:26
↓ 1 callersMethoddirectional_evaluate
(self, closure, p, t, d_p)
neural_network_lyapunov/line_search_gd.py:100
↓ 1 callersMethoddirectional_evaluate
(self, closure, p, t, d_p)
neural_network_lyapunov/line_search_adam.py:77
↓ 1 callersFunctiondouble_integrator_dynamics
The double integrator p̈ = u can be written as a linear system ẋ = Ax + Bu where x = [p, ṗ]. A = [0 1; 0 0], B = [0; 1] @return (A,
neural_network_lyapunov/test/double_integrator.py:6
↓ 1 callersFunctiondouble_integrator_lqr
Compute the LQR controller for double integrator. The LQR controller is u = -R⁻¹BᵀPx where P is the solution to the Riccati equation
neural_network_lyapunov/test/double_integrator.py:17
↓ 1 callersMethoddraw
(self, t, x)
neural_network_lyapunov/examples/pendulum/pendulum.py:121
↓ 1 callersFunctiondraw_cost_to_go
(ax, x_lo, x_up)
neural_network_lyapunov/test/double_integrator_control_lyapunov_demo.py:50
↓ 1 callersMethoddtype
(self)
neural_network_lyapunov/control_affine_system.py:60
↓ 1 callersFunctiondynamics_constraint_evaluator
(plant, xut)
neural_network_lyapunov/examples/car/unicycle_traj_opt.py:9
↓ 1 callersMethodentry_gradient_tester
(self, network, network_param, x_lo, x_up, mip_entry_name, mip_entry_size, atol,
neural_network_lyapunov/test/test_relu_to_optimization.py:1271
↓ 1 callersFunctionextract_relu_parameters
For a feedforward network with (leaky) relu activation units, extract the weights and bias into one tensor.
neural_network_lyapunov/utils.py:1017
↓ 1 callersMethodf
The dynamics is ẋ=f(x)+G(x)u
neural_network_lyapunov/control_affine_system.py:93
↓ 1 callersMethodf
(self, x)
neural_network_lyapunov/control_affine_system.py:136
↓ 1 callersFunctiongenerate_controller_dataset
Generate the dataset to train a controller and value function. Simulate the pendulum dynamics (and cost-to-go) using an energy shaping +
neural_network_lyapunov/examples/pendulum/train_pendulum_demo.py:114
↓ 1 callersFunctiongenerate_dataset
(plant, dt)
neural_network_lyapunov/examples/pole/learn_relu_dynamics.py:9
↓ 1 callersFunctiongenerate_dataset
(cfg, mb, actuation_mask)
neural_network_lyapunov/examples/tinydiffsim/learn_ca_dyn.py:28
↓ 1 callersFunctiongenerate_dynamics_data
()
neural_network_lyapunov/examples/pendulum/train_continuous_pendulum_demo.py:17
↓ 1 callersFunctiongenerate_dynamics_data
(dt)
neural_network_lyapunov/examples/car/train_acceleration_car_demo.py:20
↓ 1 callersFunctiongenerate_dynamics_data
Generate many pairs of state/action to next state. Notice that since the car dynamics is shift invariant, our input doesn't include the c
neural_network_lyapunov/examples/car/train_unicycle_demo.py:42
↓ 1 callersFunctiongenerate_dynamics_data
(dt)
neural_network_lyapunov/examples/rocket/train_rocket_demo.py:16
↓ 1 callersFunctiongenerate_dynamics_data
()
neural_network_lyapunov/examples/quadrotor2d/train_continuous_quadrotor_2d_demo.py:19
↓ 1 callersFunctiongenerate_pendulum_dynamics_data
Generate the pairs (x[n], u[n]) -> (x[n+1])
neural_network_lyapunov/examples/pendulum/train_pendulum_demo.py:23
↓ 1 callersFunctiongenerate_quadrotor_dynamics_data
(dt)
neural_network_lyapunov/examples/quadrotor3d/train_quadrotor_demo.py:23
↓ 1 callersFunctiongenerate_quadrotor_dynamics_data
Generate the pairs (x[n], u[n]) -> (x[n+1])
neural_network_lyapunov/examples/quadrotor2d/train_quadrotor_2d_demo.py:20
↓ 1 callersFunctionget_action
(x)
neural_network_lyapunov/examples/rl/test_policy.py:22
↓ 1 callersMethodget_limit_samples
(self, n)
neural_network_lyapunov/train_value.py:151
↓ 1 callersMethodget_limit_x0
(self)
neural_network_lyapunov/train_value.py:124
↓ 1 callersMethodget_lyapunov_parameters
return a list of lists of parameters that correpond to the lyapunov only
neural_network_lyapunov/dynamics_learning.py:84
↓ 1 callersFunctionget_mesh_markers
(traj, num_markers)
neural_network_lyapunov/examples/quadrotor3d/visualize_quadrotor3d.py:65
↓ 1 callersFunctionget_models
(cfg)
neural_network_lyapunov/examples/tinydiffsim/learn_ca_dyn.py:87
↓ 1 callersMethodget_trainable_parameters
return a list of lists of parameters that are trainable
neural_network_lyapunov/dynamics_learning.py:522
↓ 1 callersFunctionis_point_in_box
(pt)
neural_network_lyapunov/test/train_2d_lyapunov_utils.py:341
↓ 1 callersFunctionlearn_relu_dynamics
(dynamics_model, dynamics_dataset, u_z_equilibrium, num_epochs, lr)
neural_network_lyapunov/examples/pole/learn_relu_dynamics.py:45
↓ 1 callersMethodline_search
(self, loss0, closure, p, t, d_p)
neural_network_lyapunov/line_search_gd.py:106
↓ 1 callersMethodline_search
(self, loss0, closure, p, t, d_p)
neural_network_lyapunov/line_search_adam.py:83
↓ 1 callersFunctionload_config
()
neural_network_lyapunov/examples/car/train_car_depth_dynamics.py:433
↓ 1 callersFunctionload_multibody
(cfg)
neural_network_lyapunov/examples/tinydiffsim/learn_ca_dyn.py:11
↓ 1 callersFunctionload_policy_and_env
(env, fpath)
neural_network_lyapunov/examples/rl/test_policy.py:15
↓ 1 callersMethodlyapunov_derivative_as_milp_bounded_tester
Test lyapunov_derivative_as_milp function, but with a lower and upper bounds on V(x[n])
neural_network_lyapunov/test/test_lyapunov.py:1269
↓ 1 callersMethodlyapunov_derivative_as_milp_fixed_state
( self, system, relu, x_equilibrium, V_lambda, dV_epsilon, eps_type, R, x_val, lyapuno
neural_network_lyapunov/test/test_lyapunov.py:1085
↓ 1 callersMethodlyapunov_derivative_loss_at_samples
We will sample states x̅ⁱ, i=1,...N, and we would like the Lyapunov function to decrease on these sampled states x̅ⁱ. We denote l(x)
neural_network_lyapunov/continuous_time_lyapunov.py:1122
↓ 1 callersMethodlyapunov_derivative_loss_at_samples_and_next_states
We will sample states x̅ⁱ, i=1,...N, and we would like the Lyapunov function to decrease on these sampled states x̅ⁱ. We denote l(x)
neural_network_lyapunov/continuous_time_lyapunov.py:1187
↓ 1 callersMethodlyapunov_derivative_loss_at_samples_and_next_states_tester
( self, dut, V_lambda, epsilon, state_samples, state_next, x_equilibrium, eps_type, R,
neural_network_lyapunov/test/test_continuous_time_lyapunov.py:264
↓ 1 callersMethodmip_return_gradient_tester
(self, network, network_param, x_lo, x_up, atol, rtol)
neural_network_lyapunov/test/test_relu_to_optimization.py:1312
↓ 1 callersMethodmixed_integer_constraints
We can rewrite the hybrid dynamics as mixed integer linear constraints. We denote αᵢ = 1 if the system is in mode i. x[n+1] =
neural_network_lyapunov/hybrid_linear_system.py:141
↓ 1 callersMethodmixed_integer_constraints
We can rewrite the hybrid dynamics as mixed integer linear constraints. We denote γᵢ = 1 if the system is in mode i. ẋ = ∑ᵢ
neural_network_lyapunov/hybrid_linear_system.py:462
↓ 1 callersMethodmixed_integer_constraints
(self)
neural_network_lyapunov/control_affine_system.py:119
↓ 1 callersMethodmixed_integer_constraints
@return mixed-integer linear constraints MixedIntegerConstraintsReturn Ain_x, Ain_s, Ain_gamma, rhs_in, Aeq_x
neural_network_lyapunov/relu_system.py:136
↓ 1 callersMethodmixed_integer_constraints
@return mixed-integer linear constraints MixedIntegerConstraintsReturn Ain_x, Ain_s, Ain_gamma, rhs_in, Aeq_x
neural_network_lyapunov/relu_system.py:231
↓ 1 callersMethodmixed_integer_constraints
@return mixed-integer linear constraints MixedIntegerConstraintsReturn Ain_x, Ain_s, Ain_gamma, rhs_in, Aeq_x
neural_network_lyapunov/relu_system.py:339
↓ 1 callersMethodmode
Returns the mode of state x. Namely P[mode] * x <= q[mode]. returns None if x is not in any mode. Notice that we choose the f
neural_network_lyapunov/hybrid_linear_system.py:571
↓ 1 callersMethodnearest_node
Returns the index of the node with the nearest distance to x, measured as the weighted L2 distance with weights Q.
neural_network_lyapunov/examples/car/rrt_star.py:86
↓ 1 callersMethodneighbours
Return the indices of the nodes within distance radius to x.
neural_network_lyapunov/examples/car/rrt_star.py:140
↓ 1 callersMethodnext_pose
Compute the next pose (x_next, y_next, yaw_next) given the current state (x, y, yaw, vel) and control (yaw_rate, accel) after dt.
neural_network_lyapunov/examples/car/acceleration_car.py:36
↓ 1 callersMethodnext_pose
Computes the next pose of the quadrotor after dt.
neural_network_lyapunov/examples/quadrotor2d/quadrotor_2d.py:94
↓ 1 callersFunctionone_step_lookahead
(V, r, i)
neural_network_lyapunov/examples/car/value_iteration.py:33
↓ 1 callersMethodoutput_gradient
The ReLU network output is a piecewise linear function of the input x. Hence the gradient of the output w.r.t the input can be expres
neural_network_lyapunov/relu_to_optimization.py:917
↓ 1 callersFunctionplot_V
(V, n_angle=20)
neural_network_lyapunov/examples/car/value_iteration.py:209
↓ 1 callersFunctionrelu_training
(num_samples, x_lo, x_up)
neural_network_lyapunov/test/double_integrator_control_lyapunov_demo.py:59
↓ 1 callersMethodrollout
generates a rollout with the learned dynamics for N step @param x_init tensor of dim [2*num_channels, width, height] @param N
neural_network_lyapunov/dynamics_learning.py:814
↓ 1 callersFunctionrun_policy
(env, get_action, max_ep_len=None, num_episodes=100, render=False)
neural_network_lyapunov/examples/rl/test_policy.py:31
↓ 1 callersFunctionrun_sim
(gravity: np.array, dt, is_visualizing=True)
neural_network_lyapunov/examples/pole/simulation/pole_balancing_sim.py:196
↓ 1 callersMethodsample_batch
(self, batch_size=32)
neural_network_lyapunov/examples/rl/td3.py:109
↓ 1 callersMethodsample_state
(self)
neural_network_lyapunov/examples/car/rrt_star.py:214
↓ 1 callersMethodsatisfied
(self, mip_cnstr_return, x_val: float, s_val: float, alpha_val: list)
neural_network_lyapunov/test/test_utils.py:114
↓ 1 callersFunctionset_param
(linear, param_count)
neural_network_lyapunov/utils.py:965
↓ 1 callersFunctionset_param
(linear, param_count)
neural_network_lyapunov/test/train_continuous_linear_system_toy_lyapunov.py:40
↓ 1 callersFunctionset_param
(linear, param_count)
neural_network_lyapunov/test/train_discrete_linear_system_toy_lyapunov.py:30
↓ 1 callersFunctionset_param
(linear, param_count)
neural_network_lyapunov/test/test_train_utils.py:13
← previousnext →401–500 of 1,470, ranked by callers