Skip to content

Commit e9886fa

Browse files
committed
Small parameter adjustments
1 parent d88f93f commit e9886fa

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

code/nnv/examples/Submission/VNN_COMP2025/run_vnncomp_instance.m

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
% Load networks
1515

16-
[net, nnvnet, needReshape, reachOptionsList, inputSize, inputFormat] = load_vnncomp_network(category, onnx, vnnlib);
16+
[net, nnvnet, needReshape, reachOptionsList, inputSize, inputFormat, nRand] = load_vnncomp_network(category, onnx, vnnlib);
1717

1818
if isempty(inputSize)
1919
inputSize = net.Layers(1, 1).InputSize;
@@ -32,7 +32,7 @@
3232

3333
%% 2) SAT?
3434

35-
nRand = 100; % number of random inputs (this can be changed)
35+
% nRand = 100; % number of random inputs (this can be changed)
3636
% We got some penalties last year, why?
3737
% Wrong vnnlib parsing? Wrong counterrexample writing? Do we need to reshape it?
3838
% Let's test last years properties and make sure those errors/bugs are
@@ -317,13 +317,13 @@
317317

318318
end
319319

320-
function [net,nnvnet,needReshape,reachOptionsList,inputSize,inputFormat] = load_vnncomp_network(category, onnx, vnnlib)
320+
function [net,nnvnet,needReshape,reachOptionsList,inputSize,inputFormat,nRand] = load_vnncomp_network(category, onnx, vnnlib)
321321
% load participating vnncomp 2025 benchmark NNs
322322
% Not yet supported:
323323
% - cctsdb (some errrors when forward propagating)
324324
% - lsnc_relu
325325
% - ml4acopf
326-
% - traffic_signs_recognition
326+
% - traffic_signs_recognition (last year all instances were sat, maybe we are not wrong?)
327327

328328

329329
needReshape = 0; % default is to use MATLAB reshape, otherwise use the python reshape
@@ -332,6 +332,7 @@
332332
numCores = feature('numcores'); % in case we select exact method
333333
inputSize = [];
334334
inputFormat = "default"; % no need to change for most of them, but needed for some ("UU")
335+
nRand = 100; % default from previous competitions
335336

336337
if contains(category, "acasxu")
337338
% acasxu: onnx to nnv
@@ -341,6 +342,7 @@
341342
reachOptions.reachMethod = 'exact-star';
342343
reachOptions.numCores = numCores;
343344
reachOptionsList{1} = reachOptions;
345+
nRand = 500;
344346
else
345347
reachOptions = struct;
346348
reachOptions.reachMethod = 'approx-star'; % default parameters
@@ -349,6 +351,7 @@
349351
reachOptions.numCores = numCores;
350352
reachOptionsList{2} = reachOptions;
351353
end
354+
352355

353356
elseif contains(category, "cctsdb_yolo")
354357
% net = importNetworkFromONNX(onnx);
@@ -438,6 +441,7 @@
438441
reachOptions.relaxFactor = 0.7;
439442
reachOptionsList{1} = reachOptions;
440443
end
444+
nRand = 500;
441445

442446
elseif contains(category, "dist_shift")
443447
% dist_shift: onnx to matlab, , matlab to nnv?
@@ -609,6 +613,7 @@
609613
reachOptions.reachMethod = 'exact-star'; % default parameters
610614
reachOptions.numCores = numCores;
611615
reachOptionsList{2} = reachOptions;
616+
nRand = 500;
612617

613618
elseif contains(category, "sat_relu")
614619
net = importNetworkFromONNX(onnx, "InputDataFormats", "BC");
@@ -634,14 +639,17 @@
634639
net = importNetworkFromONNX(onnx, "InputDataFormats","BCSS", "OutputDataFormats","BC");
635640
nnvnet = matlab2nnv(net);
636641
reachOptions = struct;
637-
reachOptions.reachMethod = 'relax-star-area'; % default parameters
638-
reachOptions.relaxFactor = 1;
642+
% reachOptions.reachMethod = 'relax-star-area'; % default parameters
643+
% reachOptions.relaxFactor = 1;
644+
% reachOptionsList{1} = reachOptions;
645+
% reachOptions = struct;
646+
% reachOptions.reachMethod = 'relax-star-area'; % default parameters
647+
% reachOptions.relaxFactor = 0.8;
648+
% reachOptionsList{2} = reachOptions;
649+
reachOptions.reachMethod = "cp-star";
639650
reachOptionsList{1} = reachOptions;
640-
reachOptions = struct;
641-
reachOptions.reachMethod = 'relax-star-area'; % default parameters
642-
reachOptions.relaxFactor = 0.8;
643-
reachOptionsList{2} = reachOptions;
644651
needReshape = 1;
652+
nRand = 500;
645653

646654
elseif contains(category, "tllverify")
647655
% tllverify: onnx to nnv

0 commit comments

Comments
 (0)