-
Notifications
You must be signed in to change notification settings - Fork 1
/
check_onnx_multipleways.m
31 lines (28 loc) · 1.05 KB
/
check_onnx_multipleways.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function check_onnx_multipleways()
% Access the folder where vnncomp benchmarks are
vnn_folder = strcat('../vnncomp2022_benchmarks/benchmarks');
listing = dir(vnn_folder);
folders = {listing.name};
% Skip first 2 folders and iterate trhough the rest of them looking for onnx networks
warning('off','all');
diary vnncomp_trials.txt
t_total = tic;
for onnx_folder = folders(3:end)
onnx_nets = dir([vnn_folder filesep onnx_folder{1} filesep 'onnx']);
disp(onnx_folder{1});
% for each file path attempt both importONNXLayer and importONNXNetwork
t = tic;
for net = 1:length(onnx_nets)
if contains(onnx_nets(net).name,'.onnx')
disp(onnx_nets(net).name);
results = load_onnx([onnx_nets(net).folder filesep onnx_nets(net).name]);
disp(results);
end
end
toc(t);
disp('------------------------------------------------------------')
end
toc(t_total);
diary off;
warning('on','all');
end