Skip to content

Instantly share code, notes, and snippets.

@vtjeng
Created April 28, 2019 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vtjeng/a0861def236fabe86f3a12a899ee4603 to your computer and use it in GitHub Desktop.
Save vtjeng/a0861def236fabe86f3a12a899ee4603 to your computer and use it in GitHub Desktop.
sample verification code for MIPVerify.jl
using MIPVerify
using Gurobi
nnparams = get_example_network_params("MNIST.WK17a_linf0.1_authors")
mnist = read_datasets("mnist")
MIPVerify.setloglevel!("info")
MIPVerify.batch_find_untargeted_attack(
nnparams,
mnist.test,
1:10000,
GurobiSolver(Gurobi.Env(), BestObjStop=0.1, TimeLimit=1200),
pp = MIPVerify.LInfNormBoundedPerturbationFamily(0.1),
norm_order=Inf,
rebuild=true,
solve_rerun_option = MIPVerify.never,
tightening_algorithm=lp,
tightening_solver = GurobiSolver(Gurobi.Env(), OutputFlag=0, TimeLimit=20),
cache_model=false,
solve_if_predicted_in_targeted=false,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment