SYMBOL INDEX (1697 symbols across 139 files) FILE: auto_LiRPA/backward_bound.py function batched_backward (line 32) | def batched_backward(self: 'BoundedModule', node, C, unstable_idx, batch... function backward_general (line 127) | def backward_general( function get_unstable_size (line 398) | def get_unstable_size(unstable_idx): function check_optimized_variable_sparsity (line 405) | def check_optimized_variable_sparsity(self: 'BoundedModule', node): function get_sparse_C (line 423) | def get_sparse_C(self: 'BoundedModule', node, ref_intermediate): function restore_sparse_bounds (line 608) | def restore_sparse_bounds(self: 'BoundedModule', node, unstable_idx, function get_degrees (line 643) | def get_degrees(node_start): function _preprocess_C (line 662) | def _preprocess_C(self: 'BoundedModule', C, node): function addA (line 708) | def addA(A1, A2): function add_bound (line 720) | def add_bound(node, node_pre, lA=None, uA=None): function add_constant_node (line 749) | def add_constant_node(lb, ub, node): function save_root_A (line 761) | def save_root_A(node, A_record, A_dict, roots, needed_A_dict, lb, ub, function select_unstable_idx (line 801) | def select_unstable_idx(ref_intermediate_lb, ref_intermediate_ub, unstab... function get_unstable_locations (line 814) | def get_unstable_locations(self: 'BoundedModule', ref_intermediate_lb, function get_alpha_crown_start_nodes (line 856) | def get_alpha_crown_start_nodes( function merge_A (line 949) | def merge_A(node, batch_A, ret_A): FILE: auto_LiRPA/beta_crown.py class SparseBeta (line 28) | class SparseBeta: method __init__ (line 29) | def __init__(self, shape, bias=False, betas=None, device='cpu'): method apply_splits (line 42) | def apply_splits(self, history, key): function get_split_nodes (line 62) | def get_split_nodes(self: 'BoundedModule'): function set_beta (line 82) | def set_beta(self: 'BoundedModule', enable_opt_interm_bounds, parameters, function set_beta_cuts (line 121) | def set_beta_cuts(self: 'BoundedModule', parameters, lr_cut_beta, betas, function reset_beta (line 132) | def reset_beta(self: 'BoundedModule', node, shape, betas, bias=False, function beta_crown_backward_bound (line 150) | def beta_crown_backward_bound(self: 'BoundedModule', node, lA, uA, start... function print_optimized_beta (line 246) | def print_optimized_beta(acts): FILE: auto_LiRPA/bound_general.py class BoundedModule (line 40) | class BoundedModule(nn.Module): method __init__ (line 62) | def __init__(self, model, global_input, bound_opts=None, method nodes (line 192) | def nodes(self) -> List[Bound]: method get_enabled_opt_act (line 195) | def get_enabled_opt_act(self): method get_optimizable_activations (line 202) | def get_optimizable_activations(self): method get_perturbed_optimizable_activations (line 218) | def get_perturbed_optimizable_activations(self): method get_splittable_activations (line 221) | def get_splittable_activations(self): method get_layers_requiring_bounds (line 225) | def get_layers_requiring_bounds(self): method check_incompatible_nodes (line 254) | def check_incompatible_nodes(self, model): method non_deter_wrapper (line 283) | def non_deter_wrapper(self, op, *args, **kwargs): method non_deter_scatter_add (line 293) | def non_deter_scatter_add(self, *args, **kwargs): method non_deter_index_select (line 296) | def non_deter_index_select(self, *args, **kwargs): method set_bound_opts (line 299) | def set_bound_opts(self, new_opts): method set_gcp_relu_indicators (line 307) | def set_gcp_relu_indicators(self, relu_layer_name, relu_indicators): method _get_A_norm (line 327) | def _get_A_norm(A): method __call__ (line 340) | def __call__(self, *input, **kwargs): method register_parameter (line 356) | def register_parameter(self, name, param): method _named_members (line 393) | def _named_members(self, method train (line 416) | def train(self, mode=True): method eval (line 421) | def eval(self): method to (line 426) | def to(self, *args, **kwargs): method __getitem__ (line 444) | def __getitem__(self, name): method roots (line 450) | def roots(self): method final_node (line 453) | def final_node(self): method get_forward_value (line 456) | def get_forward_value(self, node): method forward (line 479) | def forward(self, *x, final_node_name=None, method _mark_perturbed_nodes (line 515) | def _mark_perturbed_nodes(self, input): method _check_patches_mode (line 570) | def _check_patches_mode(self): method _clear_and_set_new (line 587) | def _clear_and_set_new( method set_input (line 637) | def set_input( method _get_node_input (line 665) | def _get_node_input(self, nodesOP, nodesIn, node): method _to (line 682) | def _to(self, obj, dest, inplace=False): method _convert_nodes (line 705) | def _convert_nodes(self, model, global_input): method _build_graph (line 800) | def _build_graph(self, nodesOP, nodesIn, nodesOut, template): method rename_nodes (line 814) | def rename_nodes(self, nodesOP, nodesIn, rename_dict): method _split_complex (line 823) | def _split_complex(self, nodesOP, nodesIn): method _get_node_name_map (line 872) | def _get_node_name_map(self): method _convert (line 889) | def _convert(self, model, global_input): method check_prior_bounds (line 923) | def check_prior_bounds(self, node, C=None): method compute_intermediate_bounds (line 970) | def compute_intermediate_bounds(self, node: Bound, prior_checked=False): method get_ref_intermediate_bounds (line 1099) | def get_ref_intermediate_bounds(self, node): method merge_A_dict (line 1131) | def merge_A_dict(self, lA_dict, uA_dict): method compute_bounds (line 1146) | def compute_bounds( method save_intermediate (line 1427) | def save_intermediate(self, save_path=None): method _compute_bounds_main (line 1461) | def _compute_bounds_main(self, C=None, method='backward', IBP=False, method _set_used_nodes (line 1543) | def _set_used_nodes(self, final): method init_infeasible_bounds_constraints (line 1560) | def init_infeasible_bounds_constraints(self, batchsize, device): FILE: auto_LiRPA/bound_multi_gpu.py class BoundDataParallel (line 22) | class BoundDataParallel(DataParallel): method __init__ (line 25) | def __init__(self, *inputs, **kwargs): method forward (line 30) | def forward(self, *inputs, **kwargs): method get_property (line 122) | def get_property(model, node_class=None, att_name=None, node_name=None): method state_dict (line 137) | def state_dict(self, destination=None, prefix='', keep_vars=False): method _named_members (line 141) | def _named_members(self, get_members_fn, prefix='', recurse=True, remo... method __getitem__ (line 144) | def __getitem__(self, name): FILE: auto_LiRPA/bound_op_map.py function register_custom_op (line 34) | def register_custom_op(op_name: str, bound_obj: Bound) -> None: function unregister_custom_op (line 37) | def unregister_custom_op(op_name: str) -> None: FILE: auto_LiRPA/bounded_tensor.py class BoundedTensor (line 23) | class BoundedTensor(Tensor): method __new__ (line 26) | def __new__(cls, x, ptb=None, *args, **kwargs): method __init__ (line 35) | def __init__(self, x, ptb=None): method __repr__ (line 38) | def __repr__(self): method clone (line 44) | def clone(self, *args, **kwargs): method _func (line 48) | def _func(self, func, *args, **kwargs): method to (line 56) | def to(self, *args, **kwargs): method _convert (line 67) | def _convert(cls, ret): method __torch_function__ (line 85) | def __torch_function__(cls, func, types, args=(), kwargs=None): class BoundedParameter (line 97) | class BoundedParameter(nn.Parameter): method __new__ (line 98) | def __new__(cls, data, ptb, requires_grad=True): method __init__ (line 101) | def __init__(self, data, ptb, requires_grad=True): method __deepcopy__ (line 105) | def __deepcopy__(self, memo): method __repr__ (line 113) | def __repr__(self): method __reduce_ex__ (line 117) | def __reduce_ex__(self, proto): FILE: auto_LiRPA/concretize_bounds.py function concretize_bounds (line 29) | def concretize_bounds( function concretize_root (line 152) | def concretize_root(self, root, batch_size, output_dim, function backward_concretize (line 244) | def backward_concretize(self, batch_size, output_dim, lb=None, ub=None, function forward_concretize (line 290) | def forward_concretize(self, lower, upper, lw, uw, use_constraints=False... FILE: auto_LiRPA/concretize_func.py function construct_constraints (line 50) | def construct_constraints(constr_A: torch.Tensor, constr_b: torch.Tensor... function _sort_out_constraints (line 79) | def _sort_out_constraints(A, b, x0, epsilon): function _dist_rearrange (line 110) | def _dist_rearrange(constraints_A, constraints_b, x0): function _solve_dual_var (line 136) | def _solve_dual_var(constr_a, object_a, constr_d, epsilon, a_mul_e=None): function sort_out_constr_batches (line 220) | def sort_out_constr_batches(x_L, x_U, constraints, rearrange_constraints... function constraints_solving (line 303) | def constraints_solving( FILE: auto_LiRPA/cuda/cuda_utils.cpp function double2float_foward (line 10) | torch::Tensor double2float_foward( function PYBIND11_MODULE (line 23) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: auto_LiRPA/cuda_utils.py class DummyCudaClass (line 23) | class DummyCudaClass: method __getattr__ (line 25) | def __getattr__(self, attr): function test_double2float (line 76) | def test_double2float(): FILE: auto_LiRPA/edit_graph.py function add_nodes (line 27) | def add_nodes(self: 'BoundedModule', nodes): function add_input_node (line 46) | def add_input_node(self: 'BoundedModule', node, index=None): function delete_node (line 56) | def delete_node(self: 'BoundedModule', node): function replace_node (line 68) | def replace_node(self: 'BoundedModule', node_old, node_new): FILE: auto_LiRPA/eps_scheduler.py class BaseScheduler (line 20) | class BaseScheduler(object): method __init__ (line 21) | def __init__(self, max_eps, opt_str): method __repr__ (line 30) | def __repr__(self): method parse_opts (line 33) | def parse_opts(self, s): method get_max_eps (line 41) | def get_max_eps(self): method get_eps (line 44) | def get_eps(self): method reached_max_eps (line 47) | def reached_max_eps(self): method step_batch (line 50) | def step_batch(self, verbose=False): method step_epoch (line 55) | def step_epoch(self, verbose=False): method update_loss (line 60) | def update_loss(self, new_loss): method train (line 64) | def train(self): method eval (line 67) | def eval(self): method set_epoch_length (line 71) | def set_epoch_length(self, epoch_length): class FixedScheduler (line 75) | class FixedScheduler(BaseScheduler): method __init__ (line 76) | def __init__(self, max_eps, opt_str=""): class LinearScheduler (line 81) | class LinearScheduler(BaseScheduler): method __init__ (line 83) | def __init__(self, max_eps, opt_str): method __repr__ (line 89) | def __repr__(self): method step_epoch (line 93) | def step_epoch(self, verbose = True): method step_batch (line 111) | def step_batch(self): class RangeScheduler (line 120) | class RangeScheduler(BaseScheduler): method __init__ (line 122) | def __init__(self, max_eps, opt_str): method __repr__ (line 127) | def __repr__(self): method step_epoch (line 131) | def step_epoch(self, verbose = True): method step_batch (line 138) | def step_batch(self): class BiLinearScheduler (line 141) | class BiLinearScheduler(LinearScheduler): method __init__ (line 143) | def __init__(self, max_eps, opt_str): method __repr__ (line 150) | def __repr__(self): method step_epoch (line 154) | def step_epoch(self, verbose = True): class SmoothedScheduler (line 175) | class SmoothedScheduler(BaseScheduler): method __init__ (line 177) | def __init__(self, max_eps, opt_str): method set_epoch_length (line 193) | def set_epoch_length(self, epoch_length): method step_epoch (line 200) | def step_epoch(self, verbose = True): method step_batch (line 210) | def step_batch(self, verbose=False): class AdaptiveScheduler (line 236) | class AdaptiveScheduler(BaseScheduler): method __init__ (line 237) | def __init__(self, max_eps, opt_str): method step_batch (line 250) | def step_batch(self): FILE: auto_LiRPA/forward_bound.py function forward_general (line 32) | def forward_general(self: 'BoundedModule', C=None, node:'Bound'=None, co... function forward_general_dynamic (line 119) | def forward_general_dynamic(self: 'BoundedModule', C=None, node:'Bound'=... function clean_memory (line 241) | def clean_memory(self: 'BoundedModule', node): function forward_refinement (line 258) | def forward_refinement(self: 'BoundedModule', node): function init_forward (line 278) | def init_forward(self: 'BoundedModule', roots, dim_in): FILE: auto_LiRPA/interval_bound.py function IBP_general (line 26) | def IBP_general(self: 'BoundedModule', node=None, C=None, function _IBP_loss_fusion (line 104) | def _IBP_loss_fusion(self: 'BoundedModule', node, C): function check_IBP_intermediate (line 152) | def check_IBP_intermediate(self: 'BoundedModule', node): function check_IBP_first_linear (line 198) | def check_IBP_first_linear(self: 'BoundedModule', node): function compare_with_IBP (line 233) | def compare_with_IBP(self, node, lower, upper, C=None): FILE: auto_LiRPA/jacobian.py function _expand_jacobian (line 32) | def _expand_jacobian(self): function expand_jacobian_node (line 57) | def expand_jacobian_node(self, jacobian_node): function compute_jacobian_bounds (line 177) | def compute_jacobian_bounds(self: 'BoundedModule', x, optimize=True, FILE: auto_LiRPA/linear_bound.py class LinearBound (line 17) | class LinearBound: method __init__ (line 18) | def __init__( method is_single_bound (line 40) | def is_single_bound(self): FILE: auto_LiRPA/operators/activation_base.py class BoundActivation (line 28) | class BoundActivation(Bound): method __init__ (line 29) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method _init_masks (line 38) | def _init_masks(self, x): method init_linear_relaxation (line 43) | def init_linear_relaxation(self, x): method add_linear_relaxation (line 50) | def add_linear_relaxation(self, mask, type, k, x0, y0=None): method bound_relax (line 81) | def bound_relax(self, x, init=False): method bound_backward (line 84) | def bound_backward(self, last_lA, last_uA, x, reduce_bias=True, **kwar... method bound_forward_w (line 127) | def bound_forward_w( method bound_forward_b (line 137) | def bound_forward_b( method bound_forward (line 144) | def bound_forward(self, dim_in, x): method interval_propagate (line 161) | def interval_propagate(self, *v): method get_split_mask (line 165) | def get_split_mask(self, lower, upper, input_index): method compute_bound_improvement_heuristics (line 173) | def compute_bound_improvement_heuristics(self, lower, upper): method get_unstable_mask (line 180) | def get_unstable_mask(self, lower, upper): class BoundOptimizableActivation (line 188) | class BoundOptimizableActivation(BoundActivation): method __init__ (line 189) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method opt_init (line 208) | def opt_init(self): method opt_start (line 213) | def opt_start(self): method opt_reuse (line 217) | def opt_reuse(self): method opt_no_reuse (line 221) | def opt_no_reuse(self): method opt_end (line 226) | def opt_end(self): method clip_alpha (line 230) | def clip_alpha(self): method init_opt_parameters (line 233) | def init_opt_parameters(self, start_nodes): method _init_opt_parameters_impl (line 244) | def _init_opt_parameters_impl(self, size_spec, name_start=None): method init_linear_relaxation (line 248) | def init_linear_relaxation(self, x, dim_opt=None): method bound_relax (line 275) | def bound_relax(self, x, init=False, dim_opt=None): method bound_backward (line 278) | def bound_backward(self, last_lA, last_uA, x, start_node=None, method _no_bound_parameters (line 337) | def _no_bound_parameters(self): method _transfer_alpha (line 342) | def _transfer_alpha(self, alpha, device=None, dtype=None, non_blocking... method dump_alpha (line 347) | def dump_alpha(self, device=None, dtype=None, non_blocking=False): method restore_alpha (line 353) | def restore_alpha(self, alpha, device=None, dtype=None, non_blocking=F... method drop_unused_alpha (line 359) | def drop_unused_alpha(self, keep_nodes): FILE: auto_LiRPA/operators/activations.py class BoundSoftplus (line 29) | class BoundSoftplus(BoundActivation): method __init__ (line 30) | def __init__(self, *args, **kwargs): method forward (line 34) | def forward(self, x): class BoundAbs (line 38) | class BoundAbs(BoundActivation): method __init__ (line 39) | def __init__(self, *args, **kwargs): method forward (line 43) | def forward(self, x): method bound_relax (line 46) | def bound_relax(self, x, init=False): method bound_backward (line 58) | def bound_backward(self, last_lA, last_uA, x, **kwargs): method interval_propagate (line 98) | def interval_propagate(self, *v): class BoundATenHeaviside (line 105) | class BoundATenHeaviside(BoundOptimizableActivation): method forward (line 106) | def forward(self, *x): method interval_propagate (line 111) | def interval_propagate(self, *v): method _init_opt_parameters_impl (line 115) | def _init_opt_parameters_impl(self, size_spec, name_start): method clip_alpha (line 120) | def clip_alpha(self): method bound_backward (line 124) | def bound_backward(self, last_lA, last_uA, *x, start_node=None, class BoundSqr (line 170) | class BoundSqr(BoundOptimizableActivation): method __init__ (line 172) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 176) | def forward(self, x): method bound_relax (line 179) | def bound_relax(self, x, init=False, dim_opt=None): method _init_opt_parameters_impl (line 200) | def _init_opt_parameters_impl(self, size_spec, **kwargs): method interval_propagate (line 207) | def interval_propagate(self, *v): method build_gradient_node (line 213) | def build_gradient_node(self, grad_upstream): class SqrGrad (line 217) | class SqrGrad(Module): method forward (line 218) | def forward(self, grad_last, preact): class BoundHardTanh (line 223) | class BoundHardTanh(BoundActivation): method __init__ (line 225) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 232) | def forward(self, x, min_val, max_val): method bound_backward (line 235) | def bound_backward(self, last_lA, last_uA, x, min_val, max_val, start_... method bound_relax (line 275) | def bound_relax(self, x, min_val, max_val, init=False, dim_opt=None): method interval_propagate (line 405) | def interval_propagate(self, *v): class BoundFloor (line 413) | class BoundFloor(BoundActivation): method forward (line 414) | def forward(self, x): method bound_relax (line 417) | def bound_relax(self, x, init=False): class BoundMultiPiecewiseNonlinear (line 424) | class BoundMultiPiecewiseNonlinear(BoundOptimizableActivation): method __init__ (line 425) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 429) | def forward(self, x, weight, offset): method clip_alpha (line 432) | def clip_alpha(self): method bound_backward (line 436) | def bound_backward(self, last_lA, last_uA, x, weight, offset, method _init_opt_parameters_impl (line 493) | def _init_opt_parameters_impl(self, size_spec, **kwargs): method get_split_mask (line 499) | def get_split_mask(self, lower, upper, input_index): FILE: auto_LiRPA/operators/add_sub.py class BoundAdd (line 23) | class BoundAdd(Bound): method __init__ (line 24) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 32) | def forward(self, x, y): method bound_backward (line 37) | def bound_backward(self, last_lA, last_uA, x, y, **kwargs): method bound_forward (line 49) | def bound_forward(self, dim_in, x, y): method interval_propagate (line 67) | def interval_propagate(self, x, y): method build_solver (line 71) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method build_gradient_node (line 108) | def build_gradient_node(self, grad_upstream): class BoundSub (line 124) | class BoundSub(Bound): method __init__ (line 125) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 130) | def forward(self, x, y): method bound_backward (line 135) | def bound_backward(self, last_lA, last_uA, x, y, **kwargs): method bound_forward (line 157) | def bound_forward(self, dim_in, x, y): method interval_propagate (line 176) | def interval_propagate(self, x, y): method build_solver (line 179) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method build_gradient_node (line 205) | def build_gradient_node(self, grad_upstream): class AddGrad (line 221) | class AddGrad(Module): method __init__ (line 222) | def __init__(self, input_shape, w=1.0): method forward (line 228) | def forward(self, grad_last): FILE: auto_LiRPA/operators/base.py function not_implemented_op (line 35) | def not_implemented_op(node, func): class Interval (line 44) | class Interval(tuple): method __new__ (line 48) | def __new__(self, lb=None, ub=None, ptb=None): method __init__ (line 51) | def __init__(self, lb, ub, ptb=None): method __str__ (line 64) | def __str__(self): method __repr__ (line 67) | def __repr__(self): method make_interval (line 71) | def make_interval(lb, ub, other=None): method get_perturbation (line 79) | def get_perturbation(interval): method is_perturbed (line 98) | def is_perturbed(interval): class Bound (line 106) | class Bound(nn.Module): method __init__ (line 124) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method __repr__ (line 191) | def __repr__(self, attrs=None): method lower (line 202) | def lower(self): method lower (line 206) | def lower(self, value): method upper (line 216) | def upper(self): method upper (line 220) | def upper(self, value): method move_lower_and_upper_bounds_to_cache (line 229) | def move_lower_and_upper_bounds_to_cache(self): method delete_lower_and_upper_bounds (line 237) | def delete_lower_and_upper_bounds(self): method is_lower_bound_current (line 243) | def is_lower_bound_current(self): method is_upper_bound_current (line 246) | def is_upper_bound_current(self): method are_output_constraints_activated_for_layer (line 249) | def are_output_constraints_activated_for_layer( method init_gammas (line 271) | def init_gammas(self, num_constraints): method clip_gammas (line 296) | def clip_gammas(self): method is_input_perturbed (line 309) | def is_input_perturbed(self, i=0): method clear (line 313) | def clear(self): method input_name (line 318) | def input_name(self): method forward (line 321) | def forward(self, *x): method interval_propagate (line 333) | def interval_propagate(self, *v): method default_interval_propagate (line 354) | def default_interval_propagate(self, *v): method bound_forward (line 370) | def bound_forward(self, dim_in, *x): method bound_dynamic_forward (line 398) | def bound_dynamic_forward(self, *x, max_dim=None, offset=0): method bound_backward (line 401) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method broadcast_backward (line 421) | def broadcast_backward(self, A, x): method build_gradient_node (line 449) | def build_gradient_node(self, grad_upstream): method get_bias (line 468) | def get_bias(self, A, bias): method make_axis_non_negative (line 524) | def make_axis_non_negative(self, axis, shape='input'): method update_requires_input_bounds (line 552) | def update_requires_input_bounds(self): method clamp_interim_bounds (line 559) | def clamp_interim_bounds(self): method check_constraint_available (line 563) | def check_constraint_available(self, node, flag=False): method _ibp_constraint (line 571) | def _ibp_constraint(self, node: 'Bound', delete_bounds_after_use=False): method _check_weight_perturbation (line 614) | def _check_weight_perturbation(self): method non_deter_wrapper (line 626) | def non_deter_wrapper(self, op, *args, **kwargs): method non_deter_scatter_add (line 636) | def non_deter_scatter_add(self, *args, **kwargs): method non_deter_index_select (line 639) | def non_deter_index_select(self, *args, **kwargs): FILE: auto_LiRPA/operators/bivariate.py class MulHelper (line 29) | class MulHelper: method __init__ (line 36) | def __init__(self): method interpolated_relaxation (line 40) | def interpolated_relaxation(x_l: Tensor, x_u: Tensor, method get_relaxation (line 78) | def get_relaxation(x_l: Tensor, x_u: Tensor, y_l: Tensor, y_u: Tensor, method get_forward_relaxation (line 95) | def get_forward_relaxation(x_l, x_u, y_l, y_u, opt_stage, alpha, start... method _get_gap (line 105) | def _get_gap(x, y, alpha, beta): class BoundMul (line 109) | class BoundMul(BoundOptimizableActivation): method __init__ (line 110) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 118) | def forward(self, x, y): method get_relaxation_opt (line 123) | def get_relaxation_opt(self, x_l, x_u, y_l, y_u): method _init_opt_parameters_impl (line 128) | def _init_opt_parameters_impl(self, size_spec, **kwargs): method _is_softmax (line 137) | def _is_softmax(self): method bound_relax (line 149) | def bound_relax(self, x, y, init=False, dim_opt=None): method _multiply_by_const (line 194) | def _multiply_by_const(x, const): method bound_backward_constant (line 216) | def bound_backward_constant(self, last_lA, last_uA, x, y, op=None, method bound_backward (line 237) | def bound_backward(self, last_lA, last_uA, x, y, start_node=None, **kw... method bound_backward_both_perturbed (line 247) | def bound_backward_both_perturbed(self, last_lA, last_uA, x, y, method bound_forward (line 327) | def bound_forward(self, dim_in, x, y): method bound_forward_constant (line 337) | def bound_forward_constant(self, x, y, batched_constant): method bound_forward_both_perturbed (line 354) | def bound_forward_both_perturbed(self, dim_in, x, y): method interval_propagate_constant (line 379) | def interval_propagate_constant(x, y, op=lambda x, const: x * const): method interval_propagate (line 390) | def interval_propagate(self, x, y): method interval_propagate_both_perturbed (line 406) | def interval_propagate_both_perturbed(*v): method build_solver (line 425) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method update_requires_input_bounds (line 433) | def update_requires_input_bounds(self): method build_gradient_node (line 449) | def build_gradient_node(self, grad_upstream): class MulGrad (line 458) | class MulGrad(Module): method __init__ (line 459) | def __init__(self, input_shape): method forward (line 464) | def forward(self, grad_last, y): class BoundDiv (line 473) | class BoundDiv(Bound): method forward (line 475) | def forward(self, x, y): FILE: auto_LiRPA/operators/clampmult.py class ClampedMultiplication (line 28) | class ClampedMultiplication(torch.autograd.Function): method clamp_mutiply_forward (line 32) | def clamp_mutiply_forward(A: Tensor, d_pos: Tensor, d_neg: Tensor, method clamp_mutiply_backward (line 68) | def clamp_mutiply_backward(A: Tensor, d_pos: Tensor, d_neg: Tensor, method forward (line 130) | def forward(ctx, A, d_pos, d_neg, b_pos, b_neg, patches_mode, reduce_b... method backward (line 140) | def backward(ctx, grad_output_A, grad_output_bias): function multiply_by_A_signs (line 148) | def multiply_by_A_signs(A, d_pos, d_neg, b_pos, b_neg, contiguous='auto', FILE: auto_LiRPA/operators/constant.py class BoundConstant (line 21) | class BoundConstant(Bound): method __init__ (line 22) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method __repr__ (line 28) | def __repr__(self): method forward (line 34) | def forward(self): method bound_backward (line 37) | def bound_backward(self, last_lA, last_uA, **kwargs): method bound_forward (line 57) | def bound_forward(self, dim_in): method build_solver (line 62) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... class BoundPrimConstant (line 66) | class BoundPrimConstant(Bound): method forward (line 67) | def forward(self): class BoundConstantOfShape (line 71) | class BoundConstantOfShape(Bound): method __init__ (line 72) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 77) | def forward(self, x): method bound_backward (line 82) | def bound_backward(self, last_lA, last_uA, x, **kwargs): method bound_forward (line 99) | def bound_forward(self, dim_in, x): method interval_propagate (line 105) | def interval_propagate(self, *v): method build_solver (line 110) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... class BoundRange (line 114) | class BoundRange(Bound): method __init__ (line 115) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 119) | def forward(self, start, end, step): class BoundATenDiag (line 126) | class BoundATenDiag(Bound): method __init__ (line 127) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 131) | def forward(self, x, diagonal=0): method interval_propagate (line 134) | def interval_propagate(self, *v): class BoundATenDiagonal (line 138) | class BoundATenDiagonal(Bound): method __init__ (line 139) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 143) | def forward(self, x, offset=0, dim1=0, dim2=1): method interval_propagate (line 146) | def interval_propagate(self, *v): method bound_backward (line 150) | def bound_backward(self, last_lA, last_uA, *args, **kwargs): FILE: auto_LiRPA/operators/convex_concave.py class BoundLog (line 24) | class BoundLog(BoundActivation): method __init__ (line 26) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 30) | def forward(self, x): method bound_relax (line 36) | def bound_relax(self, x, init=False): method interval_propagate (line 47) | def interval_propagate(self, *v): method bound_backward (line 56) | def bound_backward(self, last_lA, last_uA, x, **kwargs): class BoundSqrt (line 66) | class BoundSqrt(BoundOptimizableActivation): method __init__ (line 67) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 73) | def forward(self, x): method bound_relax (line 76) | def bound_relax(self, x, init=False, dim_opt=None): method bound_backward (line 94) | def bound_backward(self, last_lA, last_uA, x, **kwargs): method clamp_interim_bounds (line 105) | def clamp_interim_bounds(self): method _init_opt_parameters_impl (line 110) | def _init_opt_parameters_impl(self, size_spec, **kwargs): class BoundReciprocal (line 118) | class BoundReciprocal(BoundOptimizableActivation): method __init__ (line 120) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 125) | def forward(self, x): method interval_propagate (line 128) | def interval_propagate(self, *v): method bound_relax (line 134) | def bound_relax(self, x, init=False, dim_opt=None): method bound_backward (line 162) | def bound_backward(self, last_lA, last_uA, x, **kwargs): method _init_opt_parameters_impl (line 170) | def _init_opt_parameters_impl(self, size_spec, **kwargs): method build_gradient_node (line 177) | def build_gradient_node(self, grad_upstream): class ReciprocalGrad (line 181) | class ReciprocalGrad(Module): method __init__ (line 182) | def __init__(self): method forward (line 185) | def forward(self, g, x): class BoundExp (line 190) | class BoundExp(BoundOptimizableActivation): method __init__ (line 191) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 198) | def forward(self, x): method interval_propagate (line 204) | def interval_propagate(self, *v): method bound_forward (line 215) | def bound_forward(self, dim_in, x): method bound_backward (line 230) | def bound_backward(self, last_lA, last_uA, x, **kwargs): method _check_nan (line 274) | def _check_nan(self, A, bias, last_A, const_bound): method bound_relax (line 298) | def bound_relax(self, x, init=False, dim_opt=None): method _init_opt_parameters_impl (line 315) | def _init_opt_parameters_impl(self, size_spec, **kwargs): method build_gradient_node (line 322) | def build_gradient_node(self, grad_upstream): class ExpGrad (line 328) | class ExpGrad(Module): method __init__ (line 329) | def __init__(self): method forward (line 332) | def forward(self, g, preact): FILE: auto_LiRPA/operators/convolution.py class BoundConv (line 27) | class BoundConv(Bound): method __init__ (line 28) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 62) | def forward(self, *x): method bound_backward (line 70) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method build_solver (line 212) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method interval_propagate (line 349) | def interval_propagate(self, *v, C=None): method bound_dynamic_forward (line 394) | def bound_dynamic_forward(self, *x, max_dim=None, offset=0): method bound_forward (line 426) | def bound_forward(self, dim_in, *x): method build_gradient_node (line 462) | def build_gradient_node(self, grad_upstream): method update_requires_input_bounds (line 468) | def update_requires_input_bounds(self): class BoundConvTranspose (line 472) | class BoundConvTranspose(Bound): method __init__ (line 473) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 496) | def forward(self, *x): method bound_backward (line 503) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method interval_propagate (line 617) | def interval_propagate(self, *v, C=None): method bound_forward (line 650) | def bound_forward(self, dim_in, *x): class BoundPad (line 687) | class BoundPad(Bound): method __init__ (line 688) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 697) | def forward(self, x, pad, value=0.0): method interval_propagate (line 707) | def interval_propagate(self, *v): method bound_backward (line 711) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method build_solver (line 731) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... class Conv2dGrad (line 772) | class Conv2dGrad(Module): method __init__ (line 773) | def __init__(self, fw_module, weight, stride, padding, dilation, groups): method forward (line 787) | def forward(self, grad_last): class Conv2dGradOp (line 802) | class Conv2dGradOp(Function): method symbolic (line 804) | def symbolic(g, x, w, stride, padding, dilation, groups, method forward (line 813) | def forward( class BoundConv2dGrad (line 826) | class BoundConv2dGrad(Bound): method __init__ (line 827) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 841) | def forward(self, *x): method bound_backward (line 848) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method interval_propagate (line 956) | def interval_propagate(self, *v, C=None): FILE: auto_LiRPA/operators/cut_ops.py class CutModule (line 22) | class CutModule(): method __init__ (line 24) | def __init__(self, relu_nodes=[], general_beta=None, x_coeffs=None, method use_patches (line 44) | def use_patches(self, start_node): method select_active_general_beta (line 49) | def select_active_general_beta(self, start_node, unstable_idx=None): method general_beta_coeffs_mm (line 82) | def general_beta_coeffs_mm(self, unstable_spec_beta, coeffs, A, curren... method general_beta_coeffs_addmm_to_A (line 108) | def general_beta_coeffs_addmm_to_A(self, lA, uA, general_beta, coeffs,... method patch_trick (line 134) | def patch_trick(self, start_node, layer_name, A, current_layer_shape): method relu_cut (line 166) | def relu_cut(self, start_node, layer_name, last_lA, last_uA, current_l... method pre_cut (line 185) | def pre_cut(self, start_node, layer_name, lA, uA, current_layer_shape,... method jit_arelu_lA (line 204) | def jit_arelu_lA(last_lA, lower, upper, beta_mm_coeffs, unstable_or_cu... method jit_arelu_lbias (line 230) | def jit_arelu_lbias(unstable_or_cut_index, nu_hat_pos, beta_mm_coeffs,... method jit_arelu_uA (line 258) | def jit_arelu_uA(last_uA, lower, upper, beta_mm_coeffs, unstable_or_cu... method jit_arelu_ubias (line 277) | def jit_arelu_ubias(unstable_or_cut_index, nu_hat_pos, beta_mm_coeffs,... method arelu_cut (line 298) | def arelu_cut(self, start_node, layer_name, last_lA, last_uA, lower_d,... method input_cut (line 493) | def input_cut(self, start_node, lA, uA, current_layer_shape, unstable_... method bias_cut (line 513) | def bias_cut(self, start_node, lb, ub, unstable_idx=None, batch_mask=N... function _bound_oneside (line 533) | def _bound_oneside(last_A, d_pos, d_neg, b_pos, b_neg, start_node, patch... function _maybe_unfold (line 576) | def _maybe_unfold(d_tensor, last_A): FILE: auto_LiRPA/operators/dropout.py class BoundDropout (line 19) | class BoundDropout(Bound): method __init__ (line 20) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method clear (line 30) | def clear(self): method forward (line 33) | def forward(self, *inputs): method _check_forward (line 50) | def _check_forward(self): method bound_backward (line 56) | def bound_backward(self, last_lA, last_uA, *args, **kwargs): method bound_forward (line 69) | def bound_forward(self, dim_in, x, *args): method interval_propagate (line 79) | def interval_propagate(self, *v): FILE: auto_LiRPA/operators/dtype.py class BoundCast (line 20) | class BoundCast(Bound): method __init__ (line 21) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 36) | def forward(self, x): method bound_backward (line 40) | def bound_backward(self, last_lA, last_uA, x, **kwargs): method bound_forward (line 51) | def bound_forward(self, dim_in, x): method build_solver (line 56) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... FILE: auto_LiRPA/operators/gelu.py class BoundGelu (line 26) | class BoundGelu(BoundTanh): method __init__ (line 29) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method _init_masks (line 43) | def _init_masks(self, x): method precompute_relaxation (line 67) | def precompute_relaxation(self, func, dfunc, x_limit=1000): method opt_init (line 186) | def opt_init(self): method _init_opt_parameters_impl (line 194) | def _init_opt_parameters_impl(self, size_spec, name_start): method forward (line 207) | def forward(self, x): method bound_relax_impl (line 210) | def bound_relax_impl(self, x, func, dfunc): method bound_relax (line 385) | def bound_relax(self, x, init=False, dim_opt=None): method interval_propagate (line 390) | def interval_propagate(self, *v): class GELUOp (line 398) | class GELUOp(torch.autograd.Function): method symbolic (line 403) | def symbolic(g, x): method forward (line 407) | def forward(ctx, x): method backward (line 412) | def backward(ctx, grad_output): class GELU (line 420) | class GELU(nn.Module): method forward (line 421) | def forward(self, x): FILE: auto_LiRPA/operators/indexing.py class BoundGather (line 22) | class BoundGather(Bound): method __init__ (line 23) | def __init__(self, attr, x, output_index, options): method forward (line 27) | def forward(self, x, indices): method bound_backward (line 47) | def bound_backward(self, last_lA, last_uA, *args, **kwargs): method bound_forward (line 102) | def bound_forward(self, dim_in, x, indices): method interval_propagate (line 122) | def interval_propagate(self, *v): method build_solver (line 126) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method build_gradient_node (line 129) | def build_gradient_node(self, grad_upstream): class GatherGrad (line 133) | class GatherGrad(Module): method __init__ (line 134) | def __init__(self, axis, indices, input_shape): method forward (line 140) | def forward(self, grad_last): class BoundGatherElements (line 216) | class BoundGatherElements(Bound): method __init__ (line 217) | def __init__(self, attr, input, output_index, options): method forward (line 221) | def forward(self, x, index): method bound_backward (line 225) | def bound_backward(self, last_lA, last_uA, x, index, **kwargs): method interval_propagate (line 243) | def interval_propagate(self, *v): method bound_forward (line 248) | def bound_forward(self, dim_in, x, index): method _get_dim (line 257) | def _get_dim(self): FILE: auto_LiRPA/operators/jacobian.py class JacobianOP (line 23) | class JacobianOP(torch.autograd.Function): method symbolic (line 25) | def symbolic(g, output, input): method forward (line 29) | def forward(ctx, output, input): class BoundJacobianOP (line 36) | class BoundJacobianOP(Bound): method __init__ (line 37) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 40) | def forward(self, output, input): class BoundJacobianInit (line 44) | class BoundJacobianInit(Bound): method __init__ (line 45) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 49) | def forward(self, x): class GradNorm (line 58) | class GradNorm(Module): method __init__ (line 59) | def __init__(self, norm=1): method forward (line 63) | def forward(self, grad): FILE: auto_LiRPA/operators/leaf.py class BoundInput (line 25) | class BoundInput(Bound): method __init__ (line 26) | def __init__(self, ori_name, value, perturbation=None, input_index=Non... method __setattr__ (line 35) | def __setattr__(self, key, value): method forward (line 44) | def forward(self): method bound_forward (line 47) | def bound_forward(self, dim_in): method bound_backward (line 50) | def bound_backward(self, last_lA, last_uA, **kwargs): method interval_propagate (line 54) | def interval_propagate(self, *v): class BoundParams (line 58) | class BoundParams(BoundInput): method __init__ (line 59) | def __init__(self, ori_name, value, perturbation=None, options=None, a... method register_parameter (line 67) | def register_parameter(self, name, param): method init (line 75) | def init(self, initializing=False): method forward (line 78) | def forward(self): class BoundBuffers (line 84) | class BoundBuffers(BoundInput): method __init__ (line 85) | def __init__(self, ori_name, value, perturbation=None, options=None, a... method forward (line 97) | def forward(self): FILE: auto_LiRPA/operators/linear.py class BoundLinear (line 31) | class BoundLinear(BoundOptimizableActivation): method __init__ (line 32) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method _preprocess (line 66) | def _preprocess(self, a, b, c=None): method init_opt_parameters (line 81) | def init_opt_parameters(self, start_nodes): method forward (line 113) | def forward(self, x, w, b=None): method onehot_mult (line 122) | def onehot_mult(self, weight, bias, C, batch_size): method bound_backward (line 170) | def bound_backward(self, last_lA, last_uA, *x, start_node=None, method _reshape (line 481) | def _reshape(self, x_l, x_u, y_l, y_u): method propagate_A_xy (line 504) | def propagate_A_xy(last_A: Tensor, alpha_pos: Tensor, alpha_neg: Tensor, method bound_backward_with_weight (line 524) | def bound_backward_with_weight(self, last_lA, last_uA, input_lb, input... method _propagate_Linf (line 600) | def _propagate_Linf(x, w): method interval_propagate (line 613) | def interval_propagate(self, *v, C=None, w=None): method interval_propagate_with_weight (line 692) | def interval_propagate_with_weight(self, *v): method bound_forward_mul (line 748) | def bound_forward_mul(x_lw: Tensor, x_lb: Tensor, x_uw: Tensor, x_ub: ... method bound_dynamic_forward (line 765) | def bound_dynamic_forward(self, x, w=None, b=None, C=None, max_dim=Non... method bound_forward (line 791) | def bound_forward(self, dim_in, x, w=None, b=None, C=None, weight_has_... method bound_forward_with_weight (line 840) | def bound_forward_with_weight(self, dim_in, x, y): method build_solver (line 867) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method build_gradient_node (line 938) | def build_gradient_node(self, grad_upstream): method update_requires_input_bounds (line 954) | def update_requires_input_bounds(self): class BoundMatMul (line 958) | class BoundMatMul(BoundLinear): method __init__ (line 960) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 966) | def forward(self, x, y): method interval_propagate (line 971) | def interval_propagate(self, *v, C=None): method bound_backward (line 975) | def bound_backward(self, last_lA, last_uA, *x, start_node=None, **kwar... method bound_forward (line 1003) | def bound_forward(self, dim_in, x, y): method update_requires_input_bounds (line 1022) | def update_requires_input_bounds(self): class BoundNeg (line 1036) | class BoundNeg(Bound): method __init__ (line 1037) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 1041) | def forward(self, x): method bound_backward (line 1044) | def bound_backward(self, last_lA, last_uA, x, **kwargs): method bound_forward (line 1066) | def bound_forward(self, dim_in, x): method interval_propagate (line 1069) | def interval_propagate(self, *v): method build_gradient_node (line 1072) | def build_gradient_node(self, grad_upstream): class NegGrad (line 1076) | class NegGrad(Module): method forward (line 1077) | def forward(self, grad_last): class BoundCumSum (line 1081) | class BoundCumSum(Bound): method __init__ (line 1082) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 1086) | def forward(self, x, axis): class BoundIdentity (line 1090) | class BoundIdentity(Bound): method __init__ (line 1091) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 1095) | def forward(self, x): method bound_backward (line 1098) | def bound_backward(self, last_lA, last_uA, x, **kwargs): method bound_forward (line 1101) | def bound_forward(self, dim_in, x): class LinearGrad (line 1105) | class LinearGrad(Module): method __init__ (line 1106) | def __init__(self, weight): method forward (line 1110) | def forward(self, grad_last): class MatMulGrad (line 1115) | class MatMulGrad(Module): method forward (line 1116) | def forward(self, grad_last, x): FILE: auto_LiRPA/operators/logical.py class BoundWhere (line 21) | class BoundWhere(Bound): method forward (line 22) | def forward(self, condition, x, y): method interval_propagate (line 25) | def interval_propagate(self, *v): method bound_backward (line 30) | def bound_backward(self, last_lA, last_uA, condition, x, y, **kwargs): class BoundNot (line 48) | class BoundNot(Bound): method forward (line 49) | def forward(self, x): class BoundEqual (line 53) | class BoundEqual(Bound): method forward (line 54) | def forward(self, x, y): FILE: auto_LiRPA/operators/minmax.py class BoundMinMax (line 23) | class BoundMinMax(BoundOptimizableActivation): method __init__ (line 24) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method _init_opt_parameters_impl (line 30) | def _init_opt_parameters_impl(self, size_spec, name_start): method clip_alpha (line 37) | def clip_alpha(self): method forward (line 92) | def forward(self, x, y): method _backward_relaxation (line 100) | def _backward_relaxation(self, x, y, start_node=None): method bound_backward (line 221) | def bound_backward(self, last_lA, last_uA, x=None, y=None, start_shape... method interval_propagate (line 277) | def interval_propagate(self, *v): class BoundMax (line 283) | class BoundMax(BoundMinMax): method __init__ (line 284) | def __init__(self, *args, **kwargs): class BoundMin (line 289) | class BoundMin(BoundMinMax): method __init__ (line 290) | def __init__(self, *args, **kwargs): FILE: auto_LiRPA/operators/normalization.py class BoundBatchNormalization (line 29) | class BoundBatchNormalization(Bound): method __init__ (line 30) | def __init__(self, attr, inputs, output_index, options, training): method _check_unused_mean_or_var (line 48) | def _check_unused_mean_or_var(self): method forward (line 55) | def forward(self, x, w, b, m, v): method bound_forward (line 79) | def bound_forward(self, dim_in, *x): method bound_backward (line 112) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method interval_propagate (line 204) | def interval_propagate(self, *v): method build_solver (line 257) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method update_requires_input_bounds (line 299) | def update_requires_input_bounds(self): class LayerNormImpl (line 303) | class LayerNormImpl(nn.Module): method __init__ (line 304) | def __init__(self, axis, epsilon): method forward (line 309) | def forward(self, x, scale, bias): class BoundLayerNormalization (line 322) | class BoundLayerNormalization(Bound): method __init__ (line 323) | def __init__(self, attr, inputs, output_index, options): method forward (line 328) | def forward(self, x, scale, bias): FILE: auto_LiRPA/operators/pooling.py class BoundMaxPool (line 25) | class BoundMaxPool(BoundOptimizableActivation): method __init__ (line 27) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 41) | def forward(self, x): method project_simplex (line 46) | def project_simplex(self, patches): method _init_opt_parameters_impl (line 60) | def _init_opt_parameters_impl(self, size_spec, name_start): method jit_mutiply (line 75) | def jit_mutiply(Apos, Aneg, pos, neg): method bound_backward (line 78) | def bound_backward(self, last_lA, last_uA, x, start_node=None, method bound_forward (line 339) | def bound_forward(self, dim_in, x): method bound_relax (line 365) | def bound_relax(self, x, init=False, dim_opt=None): method dump_alpha (line 416) | def dump_alpha(self, device=None, dtype=None, non_blocking=False): method restore_alpha (line 421) | def restore_alpha(self, alpha, device=None, dtype=None, non_blocking=F... method drop_unused_alpha (line 425) | def drop_unused_alpha(self, keep_nodes): method build_solver (line 431) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... class BoundGlobalAveragePool (line 479) | class BoundGlobalAveragePool(Bound): method __init__ (line 480) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 483) | def forward(self, x): method bound_backward (line 487) | def bound_backward(self, last_lA, last_uA, x, **kwargs): method interval_propagate (line 495) | def interval_propagate(self, *v): class BoundAveragePool (line 502) | class BoundAveragePool(Bound): method __init__ (line 503) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 525) | def forward(self, x): method bound_backward (line 529) | def bound_backward(self, last_lA, last_uA, x, **kwargs): method build_solver (line 663) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... FILE: auto_LiRPA/operators/reduce.py class BoundReduce (line 22) | class BoundReduce(Bound): method __init__ (line 23) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method _parse_input_and_axis (line 29) | def _parse_input_and_axis(self, *x): method _return_bound_backward (line 36) | def _return_bound_backward(self, lA, uA): class BoundReduceMax (line 40) | class BoundReduceMax(BoundReduce): method __init__ (line 41) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method _parse_input_and_axis (line 48) | def _parse_input_and_axis(self, *x): method forward (line 56) | def forward(self, *x): method bound_backward (line 62) | def bound_backward(self, last_lA, last_uA, *args, **kwargs): method build_gradient_node (line 86) | def build_gradient_node(self, grad_upstream): class ReduceMaxGrad (line 96) | class ReduceMaxGrad(Module): method __init__ (line 97) | def __init__(self, axis, keepdim, input_shape, indices): method forward (line 104) | def forward(self, grad_last): class BoundReduceMin (line 154) | class BoundReduceMin(BoundReduceMax): method forward (line 155) | def forward(self, *x): class BoundReduceMean (line 162) | class BoundReduceMean(BoundReduce): method forward (line 163) | def forward(self, *x): method bound_backward (line 167) | def bound_backward(self, last_lA, last_uA, *args, **kwargs): method bound_forward (line 186) | def bound_forward(self, dim_in, x, *args): class BoundReduceSum (line 199) | class BoundReduceSum(BoundReduce): method forward (line 200) | def forward(self, *x): method bound_backward (line 207) | def bound_backward(self, last_lA, last_uA, x, *args, **kwargs): method bound_forward (line 229) | def bound_forward(self, dim_in, x, *args): method build_gradient_node (line 241) | def build_gradient_node(self, grad_upstream): class ReduceSumGrad (line 246) | class ReduceSumGrad(Module): method __init__ (line 247) | def __init__(self, axis, keepdim, input_shape): method forward (line 253) | def forward(self, grad_last): FILE: auto_LiRPA/operators/relu.py class BoundTwoPieceLinear (line 31) | class BoundTwoPieceLinear(BoundOptimizableActivation): method __init__ (line 32) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method init_opt_parameters (line 52) | def init_opt_parameters(self, start_nodes): method select_alpha_by_idx (line 164) | def select_alpha_by_idx(self, last_lA, last_uA, unstable_idx, start_no... method reconstruct_full_alpha (line 232) | def reconstruct_full_alpha(self, sparse_alpha, full_alpha_shape, alpha... method bound_backward (line 247) | def bound_backward(self, last_lA, last_uA, x=None, start_node=None, method _transfer_alpha_lookup_idx (line 361) | def _transfer_alpha_lookup_idx(self, alpha_lookup_idx, device=None, dt... method _transfer_alpha_indices (line 368) | def _transfer_alpha_indices(self, alpha_indices, device=None, dtype=No... method dump_alpha (line 374) | def dump_alpha(self, device=None, dtype=None, non_blocking=False): method restore_alpha (line 382) | def restore_alpha(self, alpha, device=None, dtype=None, non_blocking=F... method drop_unused_alpha (line 389) | def drop_unused_alpha(self, keep_nodes): class BoundRelu (line 404) | class BoundRelu(BoundTwoPieceLinear): method __init__ (line 405) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method get_unstable_idx (line 413) | def get_unstable_idx(self): method clip_alpha (line 417) | def clip_alpha(self): method forward (line 421) | def forward(self, x): method _relu_lower_bound_init (line 430) | def _relu_lower_bound_init(self, upper_k): method _relu_upper_opt_same_slope (line 456) | def _relu_upper_opt_same_slope(self, lb_lower_d, ub_lower_d, upper_d, ... method _forward_relaxation (line 493) | def _forward_relaxation(self, x): method bound_dynamic_forward (line 520) | def bound_dynamic_forward(self, x, max_dim=None, offset=0): method bound_forward (line 571) | def bound_forward(self, dim_in, x): method _relu_upper_bound (line 584) | def _relu_upper_bound(lb, ub, leaky_alpha: float): method _relu_mask_alpha (line 598) | def _relu_mask_alpha(lower, upper, lb_lower_d : Optional[Tensor], method _backward_relaxation (line 622) | def _backward_relaxation(self, last_lA, last_uA, x, start_node, unstab... method interval_propagate (line 708) | def interval_propagate(self, *v): method build_solver (line 712) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method build_gradient_node (line 782) | def build_gradient_node(self, grad_upstream): method get_split_mask (line 791) | def get_split_mask(self, lower, upper, input_index): method get_unstable_mask (line 796) | def get_unstable_mask(self, lower, upper): method compute_bound_improvement_heuristics (line 804) | def compute_bound_improvement_heuristics(self, lower, upper): class BoundLeakyRelu (line 812) | class BoundLeakyRelu(BoundRelu): class BoundSign (line 816) | class BoundSign(BoundActivation): method __init__ (line 817) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 821) | def forward(self, x): method bound_relax (line 824) | def bound_relax(self, x, init=False): class SignMergeFunction_loose (line 856) | class SignMergeFunction_loose(torch.autograd.Function): method forward (line 860) | def forward(ctx, input): method backward (line 866) | def backward(ctx, grad_output): class SignMergeFunction_tight (line 874) | class SignMergeFunction_tight(torch.autograd.Function): method forward (line 878) | def forward(ctx, input): method backward (line 884) | def backward(ctx, grad_output): class BoundSignMerge (line 893) | class BoundSignMerge(BoundTwoPieceLinear): method __init__ (line 894) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method get_unstable_idx (line 901) | def get_unstable_idx(self): method forward (line 905) | def forward(self, x): method _mask_alpha (line 909) | def _mask_alpha(self, lower, upper, lb_lower_d, ub_lower_d, lb_upper_d... method _backward_relaxation (line 925) | def _backward_relaxation(self, last_lA, last_uA, x, start_node, unstab... method build_solver (line 989) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... function relu_grad (line 1042) | def relu_grad(preact): class ReLUGradOp (line 1046) | class ReLUGradOp(Function): method symbolic (line 1052) | def symbolic(_, g, g_relu, g_relu_rev, preact): method forward (line 1056) | def forward(ctx, g, g_relu, g_relu_rev, preact): class ReLUGrad (line 1060) | class ReLUGrad(Module): method forward (line 1061) | def forward(self, g, preact): function _maybe_unfold (line 1067) | def _maybe_unfold(d_tensor, last_A): class BoundReluGrad (line 1101) | class BoundReluGrad(BoundActivation): method __init__ (line 1102) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method relu_grad (line 1108) | def relu_grad(preact): method forward (line 1111) | def forward(self, g, g_relu, g_relu_rev, preact): method interval_propagate (line 1116) | def interval_propagate(self, *v): method bound_backward (line 1128) | def bound_backward(self, last_lA, last_uA, g, g_relu, g_relu_rev, preact, FILE: auto_LiRPA/operators/reshape.py class BoundReshape (line 24) | class BoundReshape(Bound): method __init__ (line 25) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 30) | def forward(self, x, shape): method bound_backward (line 41) | def bound_backward(self, last_lA, last_uA, x, shape, **kwargs): method bound_forward (line 74) | def bound_forward(self, dim_in, x, shape): method bound_dynamic_forward (line 82) | def bound_dynamic_forward(self, x, shape, max_dim=None, offset=0): method interval_propagate (line 87) | def interval_propagate(self, *v): method build_solver (line 92) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method build_gradient_node (line 100) | def build_gradient_node(self, grad_upstream): class BoundUnsqueeze (line 106) | class BoundUnsqueeze(Bound): method __init__ (line 107) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 117) | def forward(self, *x): method bound_backward (line 126) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method bound_forward (line 148) | def bound_forward(self, dim_in, *x): method build_solver (line 160) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method build_gradient_node (line 163) | def build_gradient_node(self, grad_upstream): class UnsqueezeGrad (line 171) | class UnsqueezeGrad(Module): method __init__ (line 172) | def __init__(self, axes): method forward (line 176) | def forward(self, grad_last): class BoundExpand (line 180) | class BoundExpand(Bound): method __init__ (line 181) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 185) | def forward(self, x, y): method bound_backward (line 197) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method bound_forward (line 216) | def bound_forward(self, dim_in, *x): method build_gradient_node (line 225) | def build_gradient_node(self, grad_upstream): class ExpandGrad (line 232) | class ExpandGrad(Module): method __init__ (line 236) | def __init__(self, shape): method forward (line 240) | def forward(self, grad_last): class BoundSqueeze (line 244) | class BoundSqueeze(Bound): method __init__ (line 245) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 255) | def forward(self, *x): method bound_backward (line 263) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method bound_forward (line 274) | def bound_forward(self, dim_in, *x): method build_solver (line 287) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... class BoundFlatten (line 291) | class BoundFlatten(Bound): method __init__ (line 292) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 297) | def forward(self, x): method bound_backward (line 300) | def bound_backward(self, last_lA, last_uA, x, **kwargs): method bound_dynamic_forward (line 307) | def bound_dynamic_forward(self, x, max_dim=None, offset=0): method bound_forward (line 312) | def bound_forward(self, dim_in, x): method build_solver (line 322) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method build_gradient_node (line 327) | def build_gradient_node(self, grad_upstream): class BoundATenUnflatten (line 333) | class BoundATenUnflatten(BoundReshape): method __init__ (line 334) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 337) | def forward(self, x, dim, sizes): method bound_backward (line 344) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method bound_forward (line 350) | def bound_forward(self, dim_in, *x): method bound_dynamic_forward (line 353) | def bound_dynamic_forward(self, *x, max_dim=None, offset=0): method interval_propagate (line 356) | def interval_propagate(self, x, dim, sizes): method build_solver (line 361) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... class ReshapeGrad (line 366) | class ReshapeGrad(Module): method forward (line 367) | def forward(self, grad_last, inp): class BoundTranspose (line 374) | class BoundTranspose(Bound): method __init__ (line 375) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 385) | def forward(self, x): method bound_backward (line 388) | def bound_backward(self, last_lA, last_uA, x, **kwargs): method bound_forward (line 396) | def bound_forward(self, dim_in, x): method build_solver (line 407) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method build_gradient_node (line 410) | def build_gradient_node(self, grad_upstream): class TransposeGrad (line 416) | class TransposeGrad(Module): method __init__ (line 417) | def __init__(self, perm_inv): method forward (line 421) | def forward(self, grad_last): FILE: auto_LiRPA/operators/resize.py class BoundResize (line 26) | class BoundResize(Bound): method __init__ (line 27) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 34) | def forward(self, x, size=None, scale_factor=None): method interval_propagate (line 49) | def interval_propagate(self, *v): method bound_forward (line 53) | def bound_forward(self, dim_in, *inp): method bound_backward (line 67) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): FILE: auto_LiRPA/operators/rnn.py class BoundRNN (line 21) | class BoundRNN(Bound): method __init__ (line 22) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 32) | def forward(self, x, weight_input, weight_recurrent, bias, sequence_le... FILE: auto_LiRPA/operators/s_shaped.py class BoundSShaped (line 25) | class BoundSShaped(BoundOptimizableActivation): method __init__ (line 30) | def __init__(self, attr=None, inputs=None, output_index=0, options=Non... method opt_init (line 72) | def opt_init(self): method branch_input_domain (line 77) | def branch_input_domain(self, lb, ub): method _init_opt_parameters_impl (line 85) | def _init_opt_parameters_impl(self, size_spec, name_start, num_params=... method precompute_relaxation (line 99) | def precompute_relaxation(self, func, dfunc, x_limit=500): method precompute_dfunc_values (line 167) | def precompute_dfunc_values(self, func, dfunc, x_limit=500): method forward (line 174) | def forward(self, x): method retrieve_from_precompute (line 177) | def retrieve_from_precompute(self, precomputed_d, input_bound, default... method generate_d_lower_upper (line 204) | def generate_d_lower_upper(self, lower, upper): method retrieve_d_from_k (line 216) | def retrieve_d_from_k(self, k, func): method bound_relax_impl_same_slope (line 232) | def bound_relax_impl_same_slope(self, x, func, dfunc): method bound_relax_impl (line 279) | def bound_relax_impl(self, x, func, dfunc): method bound_relax_branch (line 488) | def bound_relax_branch(self, lb, ub): method bound_relax (line 494) | def bound_relax(self, x, init=False, dim_opt=None): method get_split_mask (line 510) | def get_split_mask(self, lower, upper, input_index): class BoundPow (line 518) | class BoundPow(BoundSShaped): method __init__ (line 519) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method generate_d_lower_upper (line 535) | def generate_d_lower_upper(self, lower, upper): method branch_input_domain (line 549) | def branch_input_domain(self, lb, ub): method precompute_relaxation (line 581) | def precompute_relaxation(self, func, dfunc, x_limit = 500): method forward (line 650) | def forward(self, x, y): method bound_backward (line 653) | def bound_backward(self, last_lA, last_uA, x, y, start_node=None, method bound_forward (line 671) | def bound_forward(self, dim_in, x, y): method bound_relax_branch (line 682) | def bound_relax_branch(self, lb, ub): method bound_relax (line 702) | def bound_relax(self, x, init=False, dim_opt=None): method interval_propagate (line 711) | def interval_propagate(self, *v): method clamp_interim_bounds (line 724) | def clamp_interim_bounds(self): function dtanh (line 731) | def dtanh(x): function dsigmoid (line 734) | def dsigmoid(x): function darctan (line 737) | def darctan(x): function d2tanh (line 740) | def d2tanh(x): function d2sigmoid (line 743) | def d2sigmoid(x): class BoundTanh (line 747) | class BoundTanh(BoundSShaped): method __init__ (line 752) | def __init__(self, attr=None, inputs=None, output_index=0, options=None, method _init_opt_parameters_impl (line 757) | def _init_opt_parameters_impl(self, size_spec, name_start): method build_gradient_node (line 761) | def build_gradient_node(self, grad_upstream): class TanhGradOp (line 768) | class TanhGradOp(Function): method symbolic (line 770) | def symbolic(_, preact): method forward (line 774) | def forward(ctx, preact): class TanhGrad (line 778) | class TanhGrad(Module): method forward (line 779) | def forward(self, g, preact): class BoundTanhGrad (line 783) | class BoundTanhGrad(BoundOptimizableActivation): method __init__ (line 784) | def __init__(self, attr=None, inputs=None, output_index=0, options=None, method forward (line 795) | def forward(self, x): method interval_propagate (line 798) | def interval_propagate(self, *v): method bound_relax (line 808) | def bound_relax(self, x, init=False, dim_opt=None): method precompute_relaxation (line 813) | def precompute_relaxation(self, x_limit=500): method retrieve_from_precompute (line 899) | def retrieve_from_precompute(self, x, flip=False): method bound_relax_impl (line 914) | def bound_relax_impl(self, x): class BoundSigmoid (line 1014) | class BoundSigmoid(BoundTanh): method __init__ (line 1015) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method build_gradient_node (line 1019) | def build_gradient_node(self, grad_upstream): class SigmoidGradOp (line 1026) | class SigmoidGradOp(Function): method symbolic (line 1028) | def symbolic(_, preact): method forward (line 1032) | def forward(ctx, preact): class SigmoidGrad (line 1037) | class SigmoidGrad(Module): method forward (line 1038) | def forward(self, g, preact): class BoundSigmoidGrad (line 1042) | class BoundSigmoidGrad(BoundTanhGrad): method __init__ (line 1043) | def __init__(self, attr=None, inputs=None, output_index=0, options=None, class BoundAtan (line 1051) | class BoundAtan(BoundTanh): method __init__ (line 1052) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method build_gradient_node (line 1057) | def build_gradient_node(self, grad_upstream): class AtanGrad (line 1064) | class AtanGrad(Module): method forward (line 1065) | def forward(self, g, preact): class BoundTan (line 1070) | class BoundTan(BoundAtan): method forward (line 1077) | def forward(self, x): method _check_bounds (line 1080) | def _check_bounds(self, lower, upper): method _init_masks (line 1095) | def _init_masks(self, x): method interval_propagate (line 1103) | def interval_propagate(self, *v): method bound_relax (line 1110) | def bound_relax(self, x, init=False, dim_opt=None): FILE: auto_LiRPA/operators/shape.py class BoundShape (line 21) | class BoundShape(Bound): method __init__ (line 22) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method shape (line 27) | def shape(x): method forward (line 30) | def forward(self, x): method bound_forward (line 34) | def bound_forward(self, dim_in, x): method build_solver (line 37) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... FILE: auto_LiRPA/operators/slice_concat.py class BoundConcat (line 25) | class BoundConcat(Bound): method __init__ (line 26) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 32) | def forward(self, *x): # x is a list of tensors method interval_propagate (line 38) | def interval_propagate(self, *v): method bound_backward (line 72) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method bound_forward (line 115) | def bound_forward(self, dim_in, *x): method build_solver (line 131) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method build_gradient_node (line 134) | def build_gradient_node(self, grad_upstream): class BoundSlice (line 146) | class BoundSlice(Bound): method __init__ (line 147) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method __repr__ (line 155) | def __repr__(self): method _fixup_params (line 166) | def _fixup_params(self, shape, start, end, axes, steps): method forward (line 180) | def forward(self, x, start=None, end=None, axes=None, steps=1): method interval_propagate (line 192) | def interval_propagate(self, *v): method build_solver (line 197) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... method bound_backward (line 200) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method bound_forward (line 241) | def bound_forward(self, dim_in, *inputs): method build_gradient_node (line 263) | def build_gradient_node(self, grad_upstream): class BoundSplit (line 275) | class BoundSplit(Bound): method __init__ (line 276) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 285) | def forward(self, *x): method bound_backward (line 292) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method bound_forward (line 315) | def bound_forward(self, dim_in, *x): method build_solver (line 325) | def build_solver(self, *v, model, C=None, model_type="mip", solver_pkg... function slice_grad (line 329) | def slice_grad(x, input_shape, start, end, axes, steps): class SliceGradOp (line 350) | class SliceGradOp(Function): method symbolic (line 356) | def symbolic(_, grad_last, input, start=None, end=None, axes=None, ste... method forward (line 363) | def forward(ctx, grad_last, input, start, end, axes, steps): class SliceGrad (line 367) | class SliceGrad(Module): method __init__ (line 368) | def __init__(self, start, end, axes, steps): method forward (line 375) | def forward(self, grad_last, input): class BoundSliceGrad (line 381) | class BoundSliceGrad(Bound): method __init__ (line 382) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 390) | def forward(self, grad_last, input): method bound_backward (line 394) | def bound_backward(self, last_lA, last_uA, *args, **kwargs): function concat_grad (line 409) | def concat_grad(x, axis, input_index, *inputs): class ConcatGradOp (line 419) | class ConcatGradOp(Function): method symbolic (line 421) | def symbolic(_, grad_last, axis, input_index, *inputs): method forward (line 426) | def forward(ctx, grad_last, axis, input_index, *inputs): class ConcatGrad (line 430) | class ConcatGrad(Module): method __init__ (line 431) | def __init__(self, axis, input_index): method forward (line 436) | def forward(self, grad_last, *input): class BoundConcatGrad (line 440) | class BoundConcatGrad(Bound): method __init__ (line 441) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 447) | def forward(self, grad_last, *inputs): method bound_backward (line 450) | def bound_backward(self, last_lA, last_uA, *args, **kwargs): FILE: auto_LiRPA/operators/softmax.py class BoundSoftmaxImpl (line 20) | class BoundSoftmaxImpl(nn.Module): method __init__ (line 21) | def __init__(self, axis): method forward (line 26) | def forward(self, x): class BoundSoftmax (line 33) | class BoundSoftmax(Bound): method __init__ (line 34) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 43) | def forward(self, x): method interval_propagate (line 53) | def interval_propagate(self, *v): FILE: auto_LiRPA/operators/solver_utils.py class DummyGurobipyClass (line 17) | class DummyGurobipyClass: method __getattr__ (line 19) | def __getattr__(self, attr): FILE: auto_LiRPA/operators/tile.py class BoundTile (line 21) | class BoundTile(Bound): method __init__ (line 22) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 26) | def forward(self, x, repeats): method bound_backward (line 29) | def bound_backward(self, last_lA, last_uA, *x, **kwargs): method bound_forward (line 51) | def bound_forward(self, dim_in, *x): FILE: auto_LiRPA/operators/trigonometric.py class BoundSin (line 26) | class BoundSin(BoundSShaped): method __init__ (line 35) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method d2_act_func (line 55) | def d2_act_func(self, x): method _init_opt_parameters_impl (line 58) | def _init_opt_parameters_impl(self, size_spec, name_start): method opt_init (line 70) | def opt_init(self): method branch_input_domain (line 77) | def branch_input_domain(self, lb, ub): method generate_d_lower_upper (line 122) | def generate_d_lower_upper(self, lower, upper): method arcsin (line 170) | def arcsin(c): method get_intersection (line 188) | def get_intersection(start, end, c, theta=0.): method n_crossing (line 196) | def n_crossing(start, end, s): method check_bound (line 206) | def check_bound(tangent_point, x): method get_lower_left_bound (line 218) | def get_lower_left_bound(xl, steps=20): method get_upper_left_bound (line 245) | def get_upper_left_bound(xl, steps=20): method get_lower_right_bound (line 272) | def get_lower_right_bound(xu, steps=20): method get_upper_right_bound (line 282) | def get_upper_right_bound(xu, steps=20): method get_bound_tb (line 290) | def get_bound_tb(self, lb, ub): method forward (line 385) | def forward(self, x): method interval_propagate (line 388) | def interval_propagate(self, *v): method bound_relax_branch (line 405) | def bound_relax_branch(self, lb, ub): class BoundCos (line 445) | class BoundCos(BoundSin): method __init__ (line 446) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 451) | def forward(self, x): method bound_relax (line 454) | def bound_relax(self, x, init=False, dim_opt=None): class BoundSec (line 465) | class BoundSec(BoundActivation): method __init__ (line 466) | def __init__(self, attr=None, inputs=None, output_index=0, options=None): method forward (line 470) | def forward(self, x): method bound_relax (line 473) | def bound_relax(self, x, init=False): method interval_propagate (line 496) | def interval_propagate(self, *v): class SinGradOp (line 507) | class SinGradOp(Function): method symbolic (line 509) | def symbolic(_, x): method forward (line 513) | def forward(ctx, input): class CosGradOp (line 517) | class CosGradOp(Function): method symbolic (line 519) | def symbolic(_, x): method forward (line 523) | def forward(ctx, input): class TanhGradOp (line 527) | class TanhGradOp(Function): method symbolic (line 529) | def symbolic(_, x): method forward (line 533) | def forward(ctx, input): FILE: auto_LiRPA/opt_pruner.py class OptPruner (line 24) | class OptPruner: method __init__ (line 26) | def __init__(self, x, threshold, multi_spec_keep_func, loss_reduction_... method prune (line 47) | def prune(self, x, C, ret_l, ret_u, ret, full_l, full_ret_l, full_ret_u, method prune_idx (line 110) | def prune_idx(self, idx_mask, idx, x): method next_iter (line 126) | def next_iter(self): method update_best (line 136) | def update_best(self, full_ret_l, full_ret_u, best_ret): method update_ratio (line 151) | def update_ratio(self, full_l, full_ret_l): method _prune_x (line 181) | def _prune_x(self, x): method _prune_dict_of_lists (line 197) | def _prune_dict_of_lists(self, dict_of_lists, pre_prune_size): method _prune_bounds_by_mask (line 210) | def _prune_bounds_by_mask(self, ret_l, ret_u, ret, interm_bounds, method get_preserve_mask (line 235) | def get_preserve_mask(self, ret_l): method _recover_bounds_to_full_batch (line 257) | def _recover_bounds_to_full_batch(self, ret): method cache_full_sized_alpha (line 287) | def cache_full_sized_alpha(self, optimizable_activations: list): method recover_full_sized_alpha (line 307) | def recover_full_sized_alpha(self, optimizable_activations: list): method clean_full_sized_alpha_cache (line 318) | def clean_full_sized_alpha_cache(self): FILE: auto_LiRPA/optimize_graph.py function _optimize_graph (line 31) | def _optimize_graph(self: 'BoundedModule'): function _copy_node_properties (line 51) | def _copy_node_properties(new, ref): function merge_sec (line 59) | def merge_sec(model: 'BoundedModule'): function div_to_mul (line 76) | def div_to_mul(model: 'BoundedModule'): function convert_sqr (line 97) | def convert_sqr(model: 'BoundedModule'): function merge_identical_act (line 121) | def merge_identical_act(model: 'BoundedModule'): function minmax_to_relu (line 139) | def minmax_to_relu(model: 'BoundedModule'): function _pair_row (line 184) | def _pair_row(Ws, bs, Wm, j, atol=1e-8): function optimize_relu_relation (line 216) | def optimize_relu_relation(model: 'BoundedModule'): FILE: auto_LiRPA/optimized_bounds.py function opt_reuse (line 98) | def opt_reuse(self: 'BoundedModule'): function opt_no_reuse (line 103) | def opt_no_reuse(self: 'BoundedModule'): function _set_alpha (line 108) | def _set_alpha(optimizable_activations, parameters, alphas, lr): function _set_gammas (line 130) | def _set_gammas(nodes, parameters): function _save_ret_first_time (line 144) | def _save_ret_first_time(bounds, best_ret): function _to_float64 (line 152) | def _to_float64(self: 'BoundedModule', C, x, aux_reference_bounds, inter... function _to_default_dtype (line 169) | def _to_default_dtype(self: 'BoundedModule', x, total_loss, full_ret, ret, function _get_idx_mask (line 195) | def _get_idx_mask(idx: int, full_ret_bound: Tensor, best_ret_bound: Tens... function _update_best_ret (line 220) | def _update_best_ret( function _update_A_dict (line 307) | def _update_A_dict(best_A, full_A, improved_idx, c_mask: Optional[Tensor... function _update_optimizable_activations (line 336) | def _update_optimizable_activations( function update_best_beta (line 370) | def update_best_beta(self: 'BoundedModule', enable_opt_interm_bounds, be... function _get_optimized_bounds (line 396) | def _get_optimized_bounds( function init_alpha (line 970) | def init_alpha(self: 'BoundedModule', x, share_alphas=False, method='bac... FILE: auto_LiRPA/output_constraints.py function invprop_enabled (line 26) | def invprop_enabled(self: 'BoundedModule'): function invprop_init_infeasible_bounds (line 30) | def invprop_init_infeasible_bounds(self: 'BoundedModule', bound_node, C): function invprop_check_infeasible_bounds (line 43) | def invprop_check_infeasible_bounds(self: 'BoundedModule', lb, ub): function backward_general_invprop (line 56) | def backward_general_invprop( function backward_general_with_output_constraint (line 140) | def backward_general_with_output_constraint( FILE: auto_LiRPA/parse_graph.py function get_node_name (line 32) | def get_node_name(node): function get_node_attribute (line 35) | def get_node_attribute(node, attribute_name): function parse_graph (line 43) | def parse_graph(graph, inputs, params): function _get_jit_params (line 140) | def _get_jit_params(module, param_exclude, param_include): function get_output_template (line 161) | def get_output_template(out): function parse_source (line 178) | def parse_source(node): function update_debug_names (line 191) | def update_debug_names(trace_graph): function parse_module (line 203) | def parse_module(module, inputs, param_exclude=".*AuxLogits.*", param_in... FILE: auto_LiRPA/patches.py function insert_zeros (line 22) | def insert_zeros(image, s): function remove_zeros (line 58) | def remove_zeros(image, s, remove_zero_start_idx=(0,0)): function unify_shape (line 78) | def unify_shape(shape): function simplify_shape (line 94) | def simplify_shape(shape): function is_shape_used (line 111) | def is_shape_used(shape, expected=0): class Patches (line 118) | class Patches: method __init__ (line 127) | def __init__( method __add__ (line 147) | def __add__(self, other): method __str__ (line 190) | def __str__(self): method device (line 199) | def device(self): method create_similar (line 209) | def create_similar(self, patches=None, stride=None, padding=None, iden... method clone (line 232) | def clone(self): method detach (line 235) | def detach(self): method to_matrix (line 254) | def to_matrix(self, input_shape): method simplify (line 261) | def simplify(self): method matmul (line 285) | def matmul(self, input, patch_abs=False, input_shape=None): method create_padding (line 322) | def create_padding(self, output_shape): function compute_patches_stride_padding (line 338) | def compute_patches_stride_padding(input_shape, patches_padding, patches... function patches_to_matrix (line 373) | def patches_to_matrix(pieces, input_shape, stride, padding, output_shape... function check_patch_biases (line 448) | def check_patch_biases(lb, ub, lower_b, upper_b): function inplace_unfold (line 465) | def inplace_unfold(image, kernel_size, stride=1, padding=0, inserted_zer... function maybe_unfold_patches (line 519) | def maybe_unfold_patches(d_tensor, last_A, alpha_lookup_idx=None): function create_valid_mask (line 634) | def create_valid_mask(output_shape, device, dtype, kernel_size, stride, ... FILE: auto_LiRPA/perturbations.py class Perturbation (line 28) | class Perturbation: method __init__ (line 42) | def __init__(self): method set_eps (line 45) | def set_eps(self, eps): method concretize (line 48) | def concretize(self, x, A, sign=-1, aux=None): method init (line 66) | def init(self, x, aux=None, forward=False): class PerturbationL0Norm (line 88) | class PerturbationL0Norm(Perturbation): method __init__ (line 94) | def __init__(self, eps, x_L=None, x_U=None, ratio=1.0): method concretize (line 100) | def concretize(self, x, A, sign=-1, aux=None): method init (line 130) | def init(self, x, aux=None, forward=False): method __repr__ (line 144) | def __repr__(self): class PerturbationLpNorm (line 148) | class PerturbationLpNorm(Perturbation): method __init__ (line 150) | def __init__(self, eps=0, norm=np.inf, x_L=None, x_U=None, eps_min=0, method get_input_bounds (line 231) | def get_input_bounds(self, x, A): method get_constraints (line 246) | def get_constraints(self, A): method concretize_matrix (line 254) | def concretize_matrix(self, x, A, sign, constraints=None): method concretize_patches (line 294) | def concretize_patches(self, x, A, sign): method concretize (line 340) | def concretize(self, x, A, sign=-1, constraints=None, aux=None): method init_sparse_linf (line 354) | def init_sparse_linf(self, x, x_L, x_U): method init (line 408) | def init(self, x, aux=None, forward=False): method add_infeasible_batches (line 447) | def add_infeasible_batches(self, infeasible_batches): method add_objective_indices (line 480) | def add_objective_indices(self, objective_indices): method constraints_enable (line 485) | def constraints_enable(self): method constraints_enable (line 492) | def constraints_enable(self, enable: bool): method constraints_enable (line 496) | def constraints_enable(self): method use_grad (line 500) | def use_grad(self): method use_grad (line 507) | def use_grad(self, use_grad: bool): method use_grad (line 511) | def use_grad(self): method add_aux_bounds (line 514) | def add_aux_bounds(self, aux_lb, aux_ub): method clear_aux_bounds (line 518) | def clear_aux_bounds(self): method reset_constraints (line 522) | def reset_constraints(self, constraints, decision_thresh): method __repr__ (line 535) | def __repr__(self): class PerturbationLinear (line 545) | class PerturbationLinear(Perturbation): method __init__ (line 560) | def __init__(self, lower_A, upper_A, lower_b, upper_b, input_lb, input... method concretize (line 577) | def concretize(self, x, A, sign=-1, aux=None): method init (line 597) | def init(self, x, aux=None, forward=False): class PerturbationSynonym (line 604) | class PerturbationSynonym(Perturbation): method __init__ (line 605) | def __init__(self, budget, eps=1.0, use_simple=False): method __repr__ (line 614) | def __repr__(self): method _load_synonyms (line 618) | def _load_synonyms(self, path='data/synonyms.json'): method set_train (line 623) | def set_train(self, train): method concretize (line 626) | def concretize(self, x, A, sign, aux): method init (line 710) | def init(self, x, aux=None, forward=False): method _build_substitution (line 794) | def _build_substitution(self, batch): FILE: auto_LiRPA/solver_module.py function build_solver_module (line 24) | def build_solver_module(self: 'BoundedModule', x=None, C=None, interm_bo... function _build_solver_general (line 81) | def _build_solver_general(self: 'BoundedModule', node: Bound, C=None, mo... function _reset_solver_vars (line 104) | def _reset_solver_vars(self: 'BoundedModule', node: Bound, iteration=True): function _reset_solver_model (line 112) | def _reset_solver_model(self: 'BoundedModule'): function _build_solver_input (line 117) | def _build_solver_input(self: 'BoundedModule', node): FILE: auto_LiRPA/tools.py function visualize (line 27) | def visualize(self: 'BoundedModule', output_path, print_bounds=False): function sanitize_graphviz_name (line 96) | def sanitize_graphviz_name(name): FILE: auto_LiRPA/utils.py function onehotc_to_dense (line 48) | def onehotc_to_dense(one_hot_c: OneHotC, dtype: torch.dtype) -> torch.Te... function reduction_str2func (line 72) | def reduction_str2func(reduction_func): function stop_criterion_placeholder (line 87) | def stop_criterion_placeholder(threshold=0): function stop_criterion_min (line 90) | def stop_criterion_min(threshold=0): function stop_criterion_all (line 93) | def stop_criterion_all(threshold=0): function stop_criterion_max (line 99) | def stop_criterion_max(threshold=0): function stop_criterion_batch (line 102) | def stop_criterion_batch(threshold=0): function stop_criterion_batch_any (line 107) | def stop_criterion_batch_any(threshold=0): function stop_criterion_general (line 115) | def stop_criterion_general(or_spec_size, threshold=0): function stop_criterion_batch_topk (line 139) | def stop_criterion_batch_topk(threshold=0, k=1314): function multi_spec_keep_func_all (line 143) | def multi_spec_keep_func_all(x): class MultiAverageMeter (line 155) | class MultiAverageMeter(object): method __init__ (line 157) | def __init__(self): method reset (line 160) | def reset(self): method set_batch_size (line 166) | def set_batch_size(self, batch_size): method update (line 169) | def update(self, key, val, n=None): method last (line 180) | def last(self, key): method avg (line 183) | def avg(self, key): method __repr__ (line 189) | def __repr__(self): class MultiTimer (line 196) | class MultiTimer(object): method __init__ (line 198) | def __init__(self): method reset (line 200) | def reset(self): method start (line 203) | def start(self, key): method stop (line 207) | def stop(self, key): method total (line 212) | def total(self, key): method __repr__ (line 214) | def __repr__(self): class Flatten (line 221) | class Flatten(nn.Flatten): class Unflatten (line 229) | class Unflatten(nn.Module): method __init__ (line 230) | def __init__(self, wh): method forward (line 233) | def forward(self, x): class Max (line 237) | class Max(nn.Module): method __init__ (line 239) | def __init__(self): method forward (line 242) | def forward(self, x, y): class Min (line 246) | class Min(nn.Module): method __init__ (line 248) | def __init__(self): method forward (line 251) | def forward(self, x, y): function scale_gradients (line 255) | def scale_gradients(optimizer, gradient_accumulation_steps, grad_clip=No... function unpack_inputs (line 268) | def unpack_inputs(inputs, device=None): function isnan (line 282) | def isnan(x): function prod (line 288) | def prod(x): function batched_index_select (line 292) | def batched_index_select(input, dim, index): function get_spec_matrix (line 313) | def get_spec_matrix(X, y, num_classes): function unravel_index (line 322) | def unravel_index( class AutoBatchSize (line 348) | class AutoBatchSize: method __init__ (line 349) | def __init__(self, init_batch_size, device, vram_ratio=0.9, enable=True): method record_actual_batch_size (line 356) | def record_actual_batch_size(self, actual_batch_size): method update (line 363) | def update(self): function sync_params (line 384) | def sync_params(model_ori: torch.nn.Module, function reduce_broadcast_dims (line 408) | def reduce_broadcast_dims(A, target_shape, left_extra_dims=1): function matmul_maybe_batched (line 453) | def matmul_maybe_batched(a: torch.Tensor, b: torch.Tensor, both_batched:... function transfer (line 460) | def transfer(tensor, device=None, dtype=None, non_blocking=False): function clone_sub_A_dict (line 470) | def clone_sub_A_dict(A_dict, out_in_keys: Tuple): function clone_full_A_dict (line 504) | def clone_full_A_dict(A_dict): FILE: auto_LiRPA/wrapper.py class CrossEntropyWrapper (line 20) | class CrossEntropyWrapper(nn.Module): method __init__ (line 21) | def __init__(self, model): method forward (line 25) | def forward(self, x, labels): class CrossEntropyWrapperMultiInput (line 30) | class CrossEntropyWrapperMultiInput(nn.Module): method __init__ (line 31) | def __init__(self, model): method forward (line 35) | def forward(self, labels, *x): FILE: doc/conf.py function linkcode_resolve (line 65) | def linkcode_resolve(domain, info): FILE: examples/language/Transformer/Transformer.py class Transformer (line 30) | class Transformer(nn.Module): method __init__ (line 31) | def __init__(self, args, data_train): method save (line 69) | def save(self, epoch): method build_optimizer (line 79) | def build_optimizer(self): method train (line 87) | def train(self): method eval (line 91) | def eval(self): method get_input (line 95) | def get_input(self, batch): method forward (line 110) | def forward(self, batch): FILE: examples/language/Transformer/modeling.py class BertLayerNorm (line 25) | class BertLayerNorm(nn.Module): method __init__ (line 26) | def __init__(self, hidden_size, eps=1e-12): method forward (line 32) | def forward(self, x): class BertLayerNormNoVar (line 38) | class BertLayerNormNoVar(nn.Module): method __init__ (line 39) | def __init__(self, hidden_size, eps=1e-12): method forward (line 45) | def forward(self, x): class BertEmbeddings (line 50) | class BertEmbeddings(nn.Module): method __init__ (line 53) | def __init__(self, config, glove=None, vocab=None): method forward (line 61) | def forward(self, input_ids, token_type_ids=None): class BertSelfOutput (line 78) | class BertSelfOutput(nn.Module): method __init__ (line 79) | def __init__(self, config): method forward (line 89) | def forward(self, hidden_states, input_tensor): class BertAttention (line 100) | class BertAttention(nn.Module): method __init__ (line 101) | def __init__(self, config, input_size): method forward (line 106) | def forward(self, input_tensor, attention_mask): class BertOutput (line 112) | class BertOutput(nn.Module): method __init__ (line 113) | def __init__(self, config): method forward (line 123) | def forward(self, hidden_states, input_tensor): class BertLayer (line 133) | class BertLayer(nn.Module): method __init__ (line 134) | def __init__(self, config, layer_id): method forward (line 141) | def forward(self, hidden_states, attention_mask): class BertEncoder (line 148) | class BertEncoder(nn.Module): method __init__ (line 149) | def __init__(self, config): method forward (line 153) | def forward(self, hidden_states, attention_mask, output_all_encoded_la... class BertPooler (line 163) | class BertPooler(nn.Module): method __init__ (line 164) | def __init__(self, config): method forward (line 169) | def forward(self, hidden_states): class BertModelFromEmbeddings (line 177) | class BertModelFromEmbeddings(BertPreTrainedModel): method __init__ (line 178) | def __init__(self, config): method forward (line 184) | def forward(self, embeddings, extended_attention_mask): class BertForSequenceClassificationFromEmbeddings (line 190) | class BertForSequenceClassificationFromEmbeddings(BertPreTrainedModel): method __init__ (line 191) | def __init__(self, config, num_labels=2): method forward (line 207) | def forward(self, embeddings, extended_attention_mask): class BertForSequenceClassification (line 221) | class BertForSequenceClassification(BertPreTrainedModel): method __init__ (line 222) | def __init__(self, config, num_labels=2, glove=None, vocab=None): method forward (line 231) | def forward(self, input_ids, token_type_ids=None, attention_mask=None,... FILE: examples/language/Transformer/utils.py class InputExample (line 19) | class InputExample(object): method __init__ (line 20) | def __init__(self, guid, text_a, text_b=None, label=None): class InputFeatures (line 26) | class InputFeatures(object): method __init__ (line 27) | def __init__(self, input_ids, input_mask, segment_ids, label_id, tokens): function convert_examples_to_features (line 34) | def convert_examples_to_features(examples, label_list, max_seq_length, FILE: examples/language/data_utils.py function load_data_sst (line 5) | def load_data_sst(): function load_data (line 12) | def load_data(dataset): function clean_data (line 18) | def clean_data(data): function get_batches (line 21) | def get_batches(data, batch_size): FILE: examples/language/language_utils.py function build_vocab (line 4) | def build_vocab(data_train, min_word_freq, dump=False, include=[]): function tokenize (line 31) | def tokenize(batch, vocab, max_seq_length, drop_unk=False): function token_to_id (line 47) | def token_to_id(tokens, vocab): FILE: examples/language/lstm.py class LSTMFromEmbeddings (line 9) | class LSTMFromEmbeddings(nn.Module): method __init__ (line 10) | def __init__(self, args, vocab_size): method forward (line 27) | def forward(self, embeddings, mask): class LSTM (line 46) | class LSTM(nn.Module): method __init__ (line 47) | def __init__(self, args, data_train): method save (line 79) | def save(self, epoch): method build_optimizer (line 88) | def build_optimizer(self): method get_input (line 97) | def get_input(self, batch): method train (line 122) | def train(self): method eval (line 125) | def eval(self): FILE: examples/language/oracle.py function oracle (line 6) | def oracle(args, model, ptb, data, type): FILE: examples/language/preprocess/pre_compute_lm_scores.py function parse_args (line 18) | def parse_args(): function main (line 26) | def main(): FILE: examples/language/preprocess/preprocess_sst.py function load_data_sst (line 3) | def load_data_sst(): function read_scores (line 48) | def read_scores(split): FILE: examples/language/train.py function step (line 143) | def step(model, ptb, batch, eps=1.0, train=False): function train (line 233) | def train(epoch, batches, type): function main (line 292) | def main(): FILE: examples/sequence/data_utils.py function load_data (line 5) | def load_data(): function get_batches (line 13) | def get_batches(data, batch_size): FILE: examples/sequence/lstm.py class LSTMCore (line 7) | class LSTMCore(nn.Module): method __init__ (line 8) | def __init__(self, args): method forward (line 19) | def forward(self, X): class LSTM (line 31) | class LSTM(nn.Module): method __init__ (line 32) | def __init__(self, args): method save (line 52) | def save(self, epoch): method build_optimizer (line 63) | def build_optimizer(self): method get_input (line 70) | def get_input(self, batch): method train (line 75) | def train(self): method eval (line 78) | def eval(self): FILE: examples/sequence/train.py function step (line 32) | def step(model, ptb, batch, eps=args.eps, train=False): function train (line 64) | def train(epoch): function test (line 92) | def test(epoch, batches): FILE: examples/simple/invprop.py class simple_model (line 11) | class simple_model(torch.nn.Module): method __init__ (line 15) | def __init__(self): method forward (line 21) | def forward(self, x): FILE: examples/simple/lp_full.py function build_C (line 33) | def build_C(label, classes): FILE: examples/simple/mip_lp_solver.py class mnist_model (line 22) | class mnist_model(nn.Module): method __init__ (line 23) | def __init__( method forward (line 32) | def forward(self, x): FILE: examples/simple/toy.py class simple_model (line 9) | class simple_model(torch.nn.Module): method __init__ (line 13) | def __init__(self): method forward (line 19) | def forward(self, x): FILE: examples/vision/bound_option.py function mnist_model (line 16) | def mnist_model(): FILE: examples/vision/cifar_training.py function get_exp_module (line 20) | def get_exp_module(bounded_module): function Train (line 60) | def Train(model, t, loader, eps_scheduler, norm, train, opt, bound_type,... function main (line 190) | def main(args): FILE: examples/vision/custom_op.py class PlusConstantOp (line 16) | class PlusConstantOp(torch.autograd.Function): method symbolic (line 18) | def symbolic(g, x, const): method forward (line 28) | def forward(ctx, x, const): class PlusConstant (line 35) | class PlusConstant(nn.Module): method __init__ (line 36) | def __init__(self, const=1): method forward (line 40) | def forward(self, x): class BoundPlusConstant (line 45) | class BoundPlusConstant(Bound): method __init__ (line 46) | def __init__(self, attr, inputs, output_index, options): method forward (line 51) | def forward(self, x): method bound_backward (line 54) | def bound_backward(self, last_lA, last_uA, x, *args, **kwargs): method interval_propagate (line 73) | def interval_propagate(self, *v): FILE: examples/vision/data/ImageNet64/imagenet_data_loader.py class DatasetDownsampledImageNet (line 7) | class DatasetDownsampledImageNet(): method __init__ (line 8) | def __init__(self): method load_data (line 19) | def load_data(self, data_path, img_size=64, count=0., fname=''): FILE: examples/vision/datasets.py function get_stats (line 9) | def get_stats(loader): function mnist_loaders (line 28) | def mnist_loaders(dataset, batch_size, shuffle_train = True, shuffle_tes... function cifar_loaders (line 61) | def cifar_loaders(batch_size, shuffle_train = True, shuffle_test = False... function svhn_loaders (line 107) | def svhn_loaders(batch_size, shuffle_train = True, shuffle_test = False,... function load_data (line 154) | def load_data(data, batch_size): FILE: examples/vision/imagenet_training.py function get_exp_module (line 17) | def get_exp_module(bounded_module): function Train (line 59) | def Train(model, t, loader, eps_scheduler, norm, train, opt, bound_type,... function main (line 193) | def main(args): FILE: examples/vision/jacobian.py function build_model (line 18) | def build_model(in_ch=3, in_dim=32): function example_jacobian (line 30) | def example_jacobian(model_ori, x0, bound_opts, device): function example_local_lipschitz (line 68) | def example_local_lipschitz(model_ori, x0, bound_opts, device): function example_jvp (line 110) | def example_jvp(model_ori, x0, bound_opts, device): function compute_jacobians (line 146) | def compute_jacobians(model_ori, x0, bound_opts=None, device='cpu'): FILE: examples/vision/models/densenet.py class Bottleneck (line 11) | class Bottleneck(nn.Module): method __init__ (line 12) | def __init__(self, in_planes, growth_rate): method forward (line 19) | def forward(self, x): class Transition (line 28) | class Transition(nn.Module): method __init__ (line 29) | def __init__(self, in_planes, out_planes): method forward (line 34) | def forward(self, x): class DenseNet (line 40) | class DenseNet(nn.Module): method __init__ (line 41) | def __init__(self, block, nblocks, growth_rate=12, reduction=0.5, num_... method _make_dense_layers (line 74) | def _make_dense_layers(self, block, in_planes, nblock): method forward (line 81) | def forward(self, x): function Densenet_cifar_32 (line 93) | def Densenet_cifar_32(in_ch=3, in_dim=32): FILE: examples/vision/models/densenet_imagenet.py class Bottleneck (line 11) | class Bottleneck(nn.Module): method __init__ (line 12) | def __init__(self, in_planes, growth_rate): method forward (line 19) | def forward(self, x): class Transition (line 28) | class Transition(nn.Module): method __init__ (line 29) | def __init__(self, in_planes, out_planes): method forward (line 34) | def forward(self, x): class DenseNet (line 40) | class DenseNet(nn.Module): method __init__ (line 41) | def __init__(self, block, nblocks, growth_rate=12, reduction=0.5, num_... method _make_dense_layers (line 74) | def _make_dense_layers(self, block, in_planes, nblock): method forward (line 81) | def forward(self, x): function Densenet_imagenet (line 94) | def Densenet_imagenet(in_ch=3, in_dim=56): FILE: examples/vision/models/densenet_no_bn.py class Bottleneck (line 12) | class Bottleneck(nn.Module): method __init__ (line 13) | def __init__(self, in_planes, growth_rate): method forward (line 20) | def forward(self, x): class Transition (line 29) | class Transition(nn.Module): method __init__ (line 30) | def __init__(self, in_planes, out_planes): method forward (line 35) | def forward(self, x): class DenseNet (line 41) | class DenseNet(nn.Module): method __init__ (line 42) | def __init__(self, block, nblocks, growth_rate=12, reduction=0.5, num_... method _make_dense_layers (line 75) | def _make_dense_layers(self, block, in_planes, nblock): method forward (line 82) | def forward(self, x): function Densenet_cifar_wobn (line 94) | def Densenet_cifar_wobn(in_ch=3, in_dim=56): FILE: examples/vision/models/feedforward.py class cnn_4layer (line 11) | class cnn_4layer(nn.Module): method __init__ (line 12) | def __init__(self, in_ch, in_dim, width=2, linear_size=256): method forward (line 19) | def forward(self, x): class mlp_2layer (line 29) | class mlp_2layer(nn.Module): method __init__ (line 30) | def __init__(self, in_ch, in_dim, width=1): method forward (line 35) | def forward(self, x): class mlp_3layer (line 42) | class mlp_3layer(nn.Module): method __init__ (line 43) | def __init__(self, in_ch, in_dim, width=1): method forward (line 49) | def forward(self, x): class mlp_3layer_weight_perturb (line 57) | class mlp_3layer_weight_perturb(nn.Module): method __init__ (line 58) | def __init__(self, in_ch=1, in_dim=28, width=1, pert_weight=True, pert... method forward (line 77) | def forward(self, x): class mlp_5layer (line 85) | class mlp_5layer(nn.Module): method __init__ (line 86) | def __init__(self, in_ch, in_dim, width=1): method forward (line 94) | def forward(self, x): function cnn_7layer (line 105) | def cnn_7layer(in_ch=3, in_dim=32, width=64, linear_size=512): function cnn_7layer_bn (line 124) | def cnn_7layer_bn(in_ch=3, in_dim=32, width=64, linear_size=512): function cnn_7layer_bn_imagenet (line 148) | def cnn_7layer_bn_imagenet(in_ch=3, in_dim=32, width=64, linear_size=512): function cnn_6layer (line 172) | def cnn_6layer(in_ch, in_dim, width=32, linear_size=256): FILE: examples/vision/models/mobilenet.py class Block (line 11) | class Block(nn.Module): method __init__ (line 13) | def __init__(self, in_planes, out_planes, expansion, stride): method forward (line 32) | def forward(self, x): class MobileNetV2 (line 40) | class MobileNetV2(nn.Module): method __init__ (line 50) | def __init__(self, num_classes=10): method _make_layers (line 60) | def _make_layers(self, in_planes): method forward (line 69) | def forward(self, x): FILE: examples/vision/models/resnet.py class Dense (line 10) | class Dense(nn.Module): method __init__ (line 11) | def __init__(self, *Ws): method forward (line 17) | def forward(self, *xs): class DenseSequential (line 23) | class DenseSequential(nn.Sequential): method forward (line 24) | def forward(self, x): function model_resnet (line 34) | def model_resnet(in_ch=3, in_dim=32, width=1, mult=16, N=1): FILE: examples/vision/models/resnet18.py class BasicBlock (line 14) | class BasicBlock(nn.Module): method __init__ (line 17) | def __init__(self, in_planes, planes, stride=1): method forward (line 34) | def forward(self, x): class Bottleneck (line 42) | class Bottleneck(nn.Module): method __init__ (line 45) | def __init__(self, in_planes, planes, stride=1): method forward (line 64) | def forward(self, x): class ResNet (line 73) | class ResNet(nn.Module): method __init__ (line 74) | def __init__(self, block, num_blocks, num_classes=10, in_planes=64): method _make_layer (line 87) | def _make_layer(self, block, planes, num_blocks, stride): method forward (line 95) | def forward(self, x): function ResNet18 (line 106) | def ResNet18(in_planes=64): FILE: examples/vision/models/resnext.py class Block (line 10) | class Block(nn.Module): method __init__ (line 14) | def __init__(self, in_planes, cardinality=32, bottleneck_width=4, stri... method forward (line 31) | def forward(self, x): class ResNeXt (line 43) | class ResNeXt(nn.Module): method __init__ (line 44) | def __init__(self, num_blocks, cardinality, bottleneck_width, num_clas... method _make_layer (line 60) | def _make_layer(self, num_blocks, stride): method forward (line 70) | def forward(self, x): function ResNeXt29_2x64d (line 81) | def ResNeXt29_2x64d(): function ResNeXt29_4x64d (line 84) | def ResNeXt29_4x64d(): function ResNeXt29_8x64d (line 87) | def ResNeXt29_8x64d(): function ResNeXt29_32x4d (line 90) | def ResNeXt29_32x4d(): function ResNeXt_cifar (line 93) | def ResNeXt_cifar(in_ch=3, in_dim=32): FILE: examples/vision/models/resnext_imagenet64.py class Block (line 10) | class Block(nn.Module): method __init__ (line 14) | def __init__(self, in_planes, cardinality=32, bottleneck_width=4, stri... method forward (line 31) | def forward(self, x): class ResNeXt (line 43) | class ResNeXt(nn.Module): method __init__ (line 44) | def __init__(self, num_blocks, cardinality, bottleneck_width, num_clas... method _make_layer (line 60) | def _make_layer(self, num_blocks, stride): method forward (line 70) | def forward(self, x): function ResNeXt_imagenet64 (line 80) | def ResNeXt_imagenet64(): FILE: examples/vision/models/vnncomp_resnet.py class BasicBlock (line 6) | class BasicBlock(nn.Module): method __init__ (line 9) | def __init__(self, in_planes, planes, stride=1, bn=True, kernel=3): method forward (line 53) | def forward(self, x): class ResNet5 (line 66) | class ResNet5(nn.Module): method __init__ (line 67) | def __init__(self, block, num_blocks=2, num_classes=10, in_planes=64, ... method _make_layer (line 85) | def _make_layer(self, block, planes, num_blocks, stride, bn, kernel): method forward (line 93) | def forward(self, x): class ResNet9 (line 110) | class ResNet9(nn.Module): method __init__ (line 111) | def __init__(self, block, num_blocks=2, num_classes=10, in_planes=64, ... method _make_layer (line 130) | def _make_layer(self, block, planes, num_blocks, stride, bn, kernel): method forward (line 138) | def forward(self, x): function resnet2b (line 156) | def resnet2b(): function resnet4b (line 159) | def resnet4b(): FILE: examples/vision/models/wide_resnet_cifar.py function conv3x3 (line 10) | def conv3x3(in_planes, out_planes, stride=1): function conv_init (line 13) | def conv_init(m): class wide_basic (line 22) | class wide_basic(nn.Module): method __init__ (line 23) | def __init__(self, in_planes, planes, dropout_rate, stride=1, use_bn=F... method forward (line 41) | def forward(self, x): class Wide_ResNet (line 56) | class Wide_ResNet(nn.Module): method __init__ (line 57) | def __init__(self, depth, widen_factor, dropout_rate, num_classes, use... method _wide_layer (line 82) | def _wide_layer(self, block, planes, num_blocks, dropout_rate, stride): method forward (line 92) | def forward(self, x): function wide_resnet_cifar (line 106) | def wide_resnet_cifar(in_ch=3, in_dim=32): function wide_resnet_cifar_bn (line 109) | def wide_resnet_cifar_bn(in_ch=3, in_dim=32): function wide_resnet_cifar_bn_wo_pooling (line 112) | def wide_resnet_cifar_bn_wo_pooling(in_ch=3, in_dim=32): # 1113M, 21M function wide_resnet_cifar_bn_wo_pooling_dropout (line 115) | def wide_resnet_cifar_bn_wo_pooling_dropout(in_ch=3, in_dim=32): # 1113M... FILE: examples/vision/models/wide_resnet_imagenet64.py function conv3x3 (line 9) | def conv3x3(in_planes, out_planes, stride=1): function conv_init (line 12) | def conv_init(m): class wide_basic (line 21) | class wide_basic(nn.Module): method __init__ (line 22) | def __init__(self, in_planes, planes, dropout_rate, stride=1): method forward (line 36) | def forward(self, x): class Wide_ResNet (line 44) | class Wide_ResNet(nn.Module): method __init__ (line 45) | def __init__(self, depth, widen_factor, dropout_rate, num_classes, method _wide_layer (line 64) | def _wide_layer(self, block, planes, num_blocks, dropout_rate, stride): method forward (line 74) | def forward(self, x): function wide_resnet_imagenet64 (line 86) | def wide_resnet_imagenet64(in_ch=3, in_dim=56, in_planes=16, widen_facto... function wide_resnet_imagenet64_1000class (line 89) | def wide_resnet_imagenet64_1000class(in_ch=3, in_dim=56, in_planes=16, w... FILE: examples/vision/save_intermediate_bound.py function mnist_model (line 12) | def mnist_model(): FILE: examples/vision/simple_training.py function Train (line 52) | def Train(model, t, loader, eps_scheduler, norm, train, opt, bound_type,... function main (line 149) | def main(args): FILE: examples/vision/simple_verification.py function mnist_model (line 17) | def mnist_model(): function concretize_bound (line 97) | def concretize_bound(A, bias, xL, xU, upper: bool): FILE: examples/vision/tinyimagenet_training.py function get_exp_module (line 18) | def get_exp_module(bounded_module): function Train (line 61) | def Train(model, t, loader, eps_scheduler, norm, train, opt, bound_type,... function main (line 195) | def main(args): FILE: examples/vision/verify_two_node.py class cnn_MNIST (line 16) | class cnn_MNIST(nn.Module): method __init__ (line 17) | def __init__(self): method forward (line 24) | def forward(self, x, y): FILE: examples/vision/weight_perturbation_training.py function get_exp_module (line 28) | def get_exp_module(bounded_module): function Train (line 69) | def Train(model, t, loader, eps_scheduler, norm, train, opt, bound_type,... function main (line 189) | def main(args): FILE: tests/test_1d_activation.py class test_model (line 14) | class test_model(nn.Module): method __init__ (line 15) | def __init__(self, act_func): method forward (line 19) | def forward(self, x): function pow_2 (line 22) | def pow_2(x): function pow_3 (line 25) | def pow_3(x): class GELUOp (line 28) | class GELUOp(torch.autograd.Function): method symbolic (line 30) | def symbolic(g, x): method forward (line 34) | def forward(ctx, x): function GELU (line 37) | def GELU(x): function gen_hardtanh (line 40) | def gen_hardtanh(min_val, max_val): function tanhgrad (line 45) | def tanhgrad(x): function sigmoidgrad (line 48) | def sigmoidgrad(x): class Test1DActivation (line 52) | class Test1DActivation(TestCase): method __init__ (line 53) | def __init__(self, methodName='runTest', device=DEFAULT_DEVICE, dtype=... method create_test (line 56) | def create_test(self, act_func, low, high, ntests=1000, nsamples=1000, method test_tan (line 135) | def test_tan(self): method test_acts (line 147) | def test_acts(self): FILE: tests/test_2d_activation.py class test_model (line 11) | class test_model(nn.Module): method __init__ (line 12) | def __init__(self, act_func): method forward (line 16) | def forward(self, x, y): function mul (line 20) | def mul(x, y): class Test2DActivation (line 24) | class Test2DActivation(TestCase): method __init__ (line 25) | def __init__(self, methodName='runTest', device=DEFAULT_DEVICE, dtype=... method create_test (line 28) | def create_test(self, act_func, low_x, high_x, low_y, high_y, method test_max (line 114) | def test_max(self): method test_min (line 118) | def test_min(self): method test_mul (line 122) | def test_mul(self): FILE: tests/test_avgpool.py function ff (line 9) | def ff(num_conv=2, num_mlp_only=None, pooling=False, activation="ReLU", function synthetic_net (line 55) | def synthetic_net(input_ch, input_dim, **kwargs): function synthetic_4c2f_pool (line 59) | def synthetic_4c2f_pool(input_ch, input_dim, **kwargs): class TestAvgPool (line 63) | class TestAvgPool(TestCase): method __init__ (line 64) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method test (line 69) | def test(self): FILE: tests/test_bound_ops.py class Dummy (line 8) | class Dummy: method __init__ (line 10) | def __init__(self, lower, upper=None, perturbed=False): class TestBoundOp (line 17) | class TestBoundOp(TestCase): method __init__ (line 18) | def __init__(self, methodName='runTest', generate=False, method test (line 24) | def test(self): FILE: tests/test_branching_heuristics.py function test_branching_heuristics (line 10) | def test_branching_heuristics(): FILE: tests/test_clip_domains.py function setup_module (line 29) | def setup_module(module): function setup_function (line 43) | def setup_function(function): function _tensor (line 51) | def _tensor(x): function test_case_one_one (line 54) | def test_case_one_one(): function test_case_one_two (line 83) | def test_case_one_two(): function test_case_one_three (line 112) | def test_case_one_three(): function test_case_one_four (line 142) | def test_case_one_four(): function test_case_two_one (line 161) | def test_case_two_one(): function test_case_two_two (line 196) | def test_case_two_two(): function test_case_two_three (line 230) | def test_case_two_three(): function concretize_bounds (line 267) | def concretize_bounds( function setup_test_matrices (line 313) | def setup_test_matrices( function create_batch_copies (line 352) | def create_batch_copies( function random_setup_generator (line 381) | def random_setup_generator( FILE: tests/test_constant.py class cnn_MNIST (line 11) | class cnn_MNIST(nn.Module): method __init__ (line 12) | def __init__(self): method forward (line 19) | def forward(self, x): class TestConstant (line 28) | class TestConstant(TestCase): method __init__ (line 30) | def __init__(self, methodName='runTest', generate=False, method test (line 37) | def test(self): FILE: tests/test_constrained_concretize.py class ConstrainedConcretizeModel (line 9) | class ConstrainedConcretizeModel(torch.nn.Module): method __init__ (line 10) | def __init__(self): method forward (line 15) | def forward(self, x): class TestConstrainedConcretize (line 21) | class TestConstrainedConcretize(TestCase): method __init__ (line 22) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method test (line 25) | def test(self): FILE: tests/test_conv.py class cnn_model (line 7) | class cnn_model(nn.Module): method __init__ (line 8) | def __init__(self, layers, padding, stride, linear): method forward (line 25) | def forward(self, x): class TestConv (line 29) | class TestConv(TestCase): method __init__ (line 30) | def __init__(self, methodName='runTest', generate=False, method test (line 37) | def test(self): FILE: tests/test_conv1d.py class Model (line 12) | class Model(nn.Module): method __init__ (line 13) | def __init__(self, kernel_size=2, stride=1, padding=0, in_features=1,o... method forward (line 27) | def forward(self, *inputs,debug=False): class TestConv1D (line 45) | class TestConv1D(TestCase): method __init__ (line 46) | def __init__(self, methodName='runTest', generate=False, method test (line 53) | def test(self): FILE: tests/test_distinct_patches.py function reset_seed (line 14) | def reset_seed(seed=1234): class cnn_4layer_b (line 21) | class cnn_4layer_b(nn.Module): method __init__ (line 22) | def __init__(self, paddingA, paddingB): method forward (line 33) | def forward(self, x): class TestDistinctPatches (line 45) | class TestDistinctPatches(TestCase): method __init__ (line 46) | def __init__(self, methodName='runTest', generate=False, method run_conv_mode (line 69) | def run_conv_mode(self, model, img, conv_mode): method test (line 83) | def test(self): FILE: tests/test_examples.py function download_data_language (line 22) | def download_data_language(): function test_transformer (line 30) | def test_transformer(): function test_lstm (line 39) | def test_lstm(): function test_lstm_seq (line 50) | def test_lstm_seq(): function test_simple_verification (line 57) | def test_simple_verification(): function test_custom_op (line 63) | def test_custom_op(): function test_efficient_convolution (line 69) | def test_efficient_convolution(): function test_two_node (line 75) | def test_two_node(): function test_simple_training (line 81) | def test_simple_training(): function test_cifar_training (line 88) | def test_cifar_training(): function test_weight_perturbation (line 96) | def test_weight_perturbation(): function test_tinyimagenet (line 104) | def test_tinyimagenet(): function test_imagenet (line 116) | def test_imagenet(): function test_release (line 129) | def test_release(): FILE: tests/test_examples_ci.py function custom_run (line 9) | def custom_run(*args, **kwargs): function run_tests (line 17) | def run_tests(): FILE: tests/test_general_nonlinear.py class Sin (line 16) | class Sin(nn.Module): method forward (line 17) | def forward(self, x): function cifar_model_wide (line 21) | def cifar_model_wide(): function bab (line 36) | def bab(model_ori, data, target, norm, eps, data_max=None, data_min=None... function test (line 92) | def test(device=DEFAULT_DEVICE, dtype=DEFAULT_DTYPE): FILE: tests/test_general_shape.py class GeneralShapeModel (line 12) | class GeneralShapeModel(nn.Module): method __init__ (line 13) | def __init__(self): method forward (line 23) | def forward(self, x, w): class TestGeneralShape (line 56) | class TestGeneralShape(TestCase): method __init__ (line 57) | def __init__(self, methodName='runTest', seed=1, generate=False, method test (line 62) | def test(self): FILE: tests/test_identity.py class TestIdentity (line 8) | class TestIdentity(TestCase): method __init__ (line 9) | def __init__(self, methodName='runTest', device=DEFAULT_DEVICE, dtype=... method test (line 12) | def test(self): FILE: tests/test_invprop.py class SimpleExampleModel (line 12) | class SimpleExampleModel(nn.Module): method __init__ (line 13) | def __init__(self): method forward (line 19) | def forward(self, x): class TestInvpropSimpleExample (line 28) | class TestInvpropSimpleExample(TestCase): method __init__ (line 29) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method test (line 34) | def test(self): class TestInvpropOODExample (line 100) | class TestInvpropOODExample(TestCase): method __init__ (line 102) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method test (line 106) | def test(self): FILE: tests/test_jacobian.py class TestJacobian (line 15) | class TestJacobian(TestCase): method __init__ (line 16) | def __init__(self, methodName='runTest', generate=False, method test (line 23) | def test(self): method test_concat_jacobian (line 41) | def test_concat_jacobian(self): FILE: tests/test_language_models.py function prepare_data (line 15) | def prepare_data(): function train (line 41) | def train(): function read_res (line 57) | def read_res(): function evaluate (line 61) | def evaluate(): function gen_ref (line 83) | def gen_ref(): function check (line 91) | def check(): function test (line 102) | def test(): FILE: tests/test_linear_cnn_model.py class LinearCNNModel (line 12) | class LinearCNNModel(nn.Module): method __init__ (line 13) | def __init__(self): method forward (line 17) | def forward(self, x): class TestLinearCNNModel (line 22) | class TestLinearCNNModel(TestLinearModel): method __init__ (line 23) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method compute_and_compare_bounds (line 27) | def compute_and_compare_bounds(self, eps, norm, IBP, method): FILE: tests/test_linear_model.py class LinearModel (line 10) | class LinearModel(nn.Module): method __init__ (line 11) | def __init__(self): method forward (line 15) | def forward(self, x): class TestLinearModel (line 19) | class TestLinearModel(TestCase): method __init__ (line 20) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method compute_and_compare_bounds (line 24) | def compute_and_compare_bounds(self, eps, norm, IBP, method): method test_Linf_forward (line 54) | def test_Linf_forward(self): method test_Linf_backward (line 58) | def test_Linf_backward(self): method test_Linf_IBP (line 62) | def test_Linf_IBP(self): method test_Linf_backward_IBP (line 66) | def test_Linf_backward_IBP(self): method test_L2_forward (line 70) | def test_L2_forward(self): method test_L2_backward (line 74) | def test_L2_backward(self): method test_L2_IBP (line 78) | def test_L2_IBP(self): method test_L2_backward_IBP (line 82) | def test_L2_backward_IBP(self): method test_L1_forward (line 86) | def test_L1_forward(self): method test_L1_backward (line 90) | def test_L1_backward(self): method test_L1_IBP (line 94) | def test_L1_IBP(self): method test_L1_backward_IBP (line 98) | def test_L1_backward_IBP(self): FILE: tests/test_maxpool.py class Model (line 11) | class Model(nn.Module): method __init__ (line 12) | def __init__(self, kernel_size=4, stride=4, padding=0, conv_padding=0): method forward (line 24) | def forward(self, *inputs): class TestMaxPool (line 44) | class TestMaxPool(TestCase): method __init__ (line 45) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method test (line 51) | def test(self): FILE: tests/test_min_max.py class Test_Model (line 10) | class Test_Model(nn.Module): method __init__ (line 11) | def __init__(self): method forward (line 35) | def forward(self, x): class TestMinMax (line 38) | class TestMinMax(TestCase): method __init__ (line 39) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method test (line 44) | def test(self): FILE: tests/test_perturbation.py class ToyModel (line 16) | class ToyModel(nn.Module): method __init__ (line 18) | def __init__(self): method forward (line 24) | def forward(self, x): class TestPerturbation (line 31) | class TestPerturbation(TestCase): method __init__ (line 37) | def __init__(self, methodName='runTest', seed=1, generate=False, method test (line 41) | def test(self): FILE: tests/test_rectangle_patches.py class cnn_4layer_resnet (line 12) | class cnn_4layer_resnet(nn.Module): method __init__ (line 13) | def __init__(self): method forward (line 21) | def forward(self, x): class TestResnetPatches (line 32) | class TestResnetPatches(TestCase): method __init__ (line 33) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method test (line 39) | def test(self): FILE: tests/test_resnet_patches.py class TestResnetPatches (line 13) | class TestResnetPatches(TestCase): method __init__ (line 14) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method test (line 20) | def test(self): FILE: tests/test_s_shaped.py class test_model (line 9) | class test_model(nn.Module): method __init__ (line 10) | def __init__(self, act_func): method forward (line 14) | def forward(self, x): function sigmoid (line 17) | def sigmoid(x): function sin (line 20) | def sin(x): function verify_bounds (line 24) | def verify_bounds(model, input_lb, input_ub, lb, ub): class TestSShaped (line 50) | class TestSShaped(TestCase): method __init__ (line 51) | def __init__(self, methodName='runTest', generate=False, method _run_bound_test (line 58) | def _run_bound_test(self, model, input_lb, input_ub, methods): method test (line 70) | def test(self): FILE: tests/test_save_intermediate.py class test_model (line 7) | class test_model(nn.Module): method __init__ (line 8) | def __init__(self): method forward (line 21) | def forward(self, x): class TestSave (line 25) | class TestSave(TestCase): method __init__ (line 26) | def __init__(self, methodName='runTest', device=DEFAULT_DEVICE, dtype=... method test (line 29) | def test(self, gen_ref=False): FILE: tests/test_simple_verification.py function mnist_model (line 11) | def mnist_model(): class TestSimpleVerification (line 24) | class TestSimpleVerification(TestCase): method __init__ (line 25) | def __init__(self, methodName='runTest', device=DEFAULT_DEVICE, dtype=... method test (line 28) | def test(self): FILE: tests/test_state_dict_name.py class FeatureExtraction (line 7) | class FeatureExtraction(nn.Module): method __init__ (line 8) | def __init__(self): method forward (line 14) | def forward(self, x): class cnn_MNIST (line 22) | class cnn_MNIST(nn.Module): method __init__ (line 23) | def __init__(self): method forward (line 28) | def forward(self, x): class TestStateDictName (line 33) | class TestStateDictName(TestCase): method __init__ (line 34) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method test (line 37) | def test(self): FILE: tests/test_tensor_storage.py class TestTensorStorage (line 9) | class TestTensorStorage(TestCase): method __init__ (line 10) | def __init__(self, methodName='runTest', device=DEFAULT_DEVICE, dtype=... method test_content (line 13) | def test_content(self, seed=123): method test_tensor_call (line 56) | def test_tensor_call(self, seed=123): method test_size_queue (line 86) | def test_size_queue(self): method test_size_stack (line 139) | def test_size_stack(self): FILE: tests/test_upsample.py class Model (line 9) | class Model(nn.Module): method __init__ (line 11) | def __init__(self, method forward (line 34) | def forward(self, input_z): class ModelReducedCGAN (line 45) | class ModelReducedCGAN(nn.Module): method __init__ (line 46) | def __init__(self): method forward (line 73) | def forward(self, input_z): function recursive_allclose (line 101) | def recursive_allclose(a, b: dict, verbose=False, prefix=''): class TestUpSample (line 131) | class TestUpSample(TestCase): method __init__ (line 132) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method test (line 137) | def test(self, seed=123): method test_instance (line 144) | def test_instance(self, kernel_size=3, scaling_factor=2, stride=1, pad... class TestReducedCGAN (line 176) | class TestReducedCGAN(TestCase): method __init__ (line 178) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method test (line 183) | def test(self, seed=456): FILE: tests/test_vision_models.py class cnn_4layer_test (line 8) | class cnn_4layer_test(nn.Module): method __init__ (line 9) | def __init__(self): method forward (line 17) | def forward(self, x): class TestVisionModels (line 27) | class TestVisionModels(TestCase): method __init__ (line 28) | def __init__(self, methodName='runTest', ref_name='vision_test_data', ... method setUp (line 35) | def setUp(self): method verify_bounds (line 44) | def verify_bounds(self, model, x, IBP, method, forward_ret, lb_name, u... method test_bounds (line 73) | def test_bounds(self, bound_opts=None, optimize = True): FILE: tests/test_vision_models_hardtanh.py class cnn_4layer_test_hardtanh (line 7) | class cnn_4layer_test_hardtanh(nn.Module): method __init__ (line 8) | def __init__(self, in_ch, in_dim, width=2, linear_size=256): method forward (line 15) | def forward(self, x): class TestCustomVisionModel (line 24) | class TestCustomVisionModel(TestVisionModels): method __init__ (line 25) | def __init__(self, methodName='runTest', model=cnn_4layer_test_hardtan... method test_bounds (line 28) | def test_bounds(self, bound_opts=None, optimize=False): FILE: tests/test_weight_perturbation.py class TestWeightPerturbation (line 12) | class TestWeightPerturbation(TestCase): method __init__ (line 13) | def __init__(self, methodName='runTest', generate=False, device=DEFAUL... method test_training (line 20) | def test_training(self): method verify_bounds (line 33) | def verify_bounds(self, model, x, IBP, method, forward_ret, lb_name, u... method test_perturbation (line 55) | def test_perturbation(self): FILE: tests/testcase.py class TestCase (line 9) | class TestCase(unittest.TestCase): method __init__ (line 12) | def __init__(self, methodName='runTest', seed=1, ref_name=None, genera... method set_seed (line 30) | def set_seed(self, seed): method setUp (line 36) | def setUp(self): method save (line 43) | def save(self): method check (line 48) | def check(self): method _assert_equal (line 66) | def _assert_equal(self, a, b): method _assert_array_equal (line 74) | def _assert_array_equal(self, a, b, msg=None): method _assert_tensor_equal (line 84) | def _assert_tensor_equal(self, a, b, msg=None): function _to (line 95) | def _to(obj, device=None, dtype=None, inplace=False): function set_default_dtype_device (line 118) | def set_default_dtype_device(dtype=DEFAULT_DTYPE, device=DEFAULT_DEVICE):