diff --git a/code/nnv/engine/matconvnet/vl_imreadjpeg.mexmaci64 b/code/nnv/engine/matconvnet/vl_imreadjpeg.mexmaci64 new file mode 100755 index 0000000000..34f2976615 Binary files /dev/null and b/code/nnv/engine/matconvnet/vl_imreadjpeg.mexmaci64 differ diff --git a/code/nnv/engine/matconvnet/vl_imreadjpeg_old.mexmaci64 b/code/nnv/engine/matconvnet/vl_imreadjpeg_old.mexmaci64 new file mode 100755 index 0000000000..b848802e60 Binary files /dev/null and b/code/nnv/engine/matconvnet/vl_imreadjpeg_old.mexmaci64 differ diff --git a/code/nnv/engine/matconvnet/vl_nnbilinearsampler.mexmaci64 b/code/nnv/engine/matconvnet/vl_nnbilinearsampler.mexmaci64 new file mode 100755 index 0000000000..8262d01050 Binary files /dev/null and b/code/nnv/engine/matconvnet/vl_nnbilinearsampler.mexmaci64 differ diff --git a/code/nnv/engine/matconvnet/vl_nnbnorm.mexmaci64 b/code/nnv/engine/matconvnet/vl_nnbnorm.mexmaci64 new file mode 100755 index 0000000000..da8aa9a559 Binary files /dev/null and b/code/nnv/engine/matconvnet/vl_nnbnorm.mexmaci64 differ diff --git a/code/nnv/engine/matconvnet/vl_nnconv.mexmaci64 b/code/nnv/engine/matconvnet/vl_nnconv.mexmaci64 new file mode 100755 index 0000000000..7f42caff7f Binary files /dev/null and b/code/nnv/engine/matconvnet/vl_nnconv.mexmaci64 differ diff --git a/code/nnv/engine/matconvnet/vl_nnconvt.mexmaci64 b/code/nnv/engine/matconvnet/vl_nnconvt.mexmaci64 new file mode 100755 index 0000000000..77bbba2ff3 Binary files /dev/null and b/code/nnv/engine/matconvnet/vl_nnconvt.mexmaci64 differ diff --git a/code/nnv/engine/matconvnet/vl_nnnormalize.mexmaci64 b/code/nnv/engine/matconvnet/vl_nnnormalize.mexmaci64 new file mode 100755 index 0000000000..fe21bddec7 Binary files /dev/null and b/code/nnv/engine/matconvnet/vl_nnnormalize.mexmaci64 differ diff --git a/code/nnv/engine/matconvnet/vl_nnnormalizelp.mexmaci64 b/code/nnv/engine/matconvnet/vl_nnnormalizelp.mexmaci64 new file mode 100755 index 0000000000..f8d9068336 Binary files /dev/null and b/code/nnv/engine/matconvnet/vl_nnnormalizelp.mexmaci64 differ diff --git a/code/nnv/engine/matconvnet/vl_nnpool.mexmaci64 b/code/nnv/engine/matconvnet/vl_nnpool.mexmaci64 new file mode 100755 index 0000000000..e07dfe62a5 Binary files /dev/null and b/code/nnv/engine/matconvnet/vl_nnpool.mexmaci64 differ diff --git a/code/nnv/engine/matconvnet/vl_nnroipool.mexmaci64 b/code/nnv/engine/matconvnet/vl_nnroipool.mexmaci64 new file mode 100755 index 0000000000..1358e185d6 Binary files /dev/null and b/code/nnv/engine/matconvnet/vl_nnroipool.mexmaci64 differ diff --git a/code/nnv/engine/matconvnet/vl_taccummex.mexmaci64 b/code/nnv/engine/matconvnet/vl_taccummex.mexmaci64 new file mode 100755 index 0000000000..d8781ed4fc Binary files /dev/null and b/code/nnv/engine/matconvnet/vl_taccummex.mexmaci64 differ diff --git a/code/nnv/engine/matconvnet/vl_tmove.mexmaci64 b/code/nnv/engine/matconvnet/vl_tmove.mexmaci64 new file mode 100755 index 0000000000..99b750bcff Binary files /dev/null and b/code/nnv/engine/matconvnet/vl_tmove.mexmaci64 differ diff --git a/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/load_rl_NNs.m b/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/load_rl_NNs.m index 090ecea2ca..988020c996 100644 --- a/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/load_rl_NNs.m +++ b/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/load_rl_NNs.m @@ -9,22 +9,28 @@ t = tic; for h = 1:length(listNN) % generlize NN loading options for all benchmarks if endsWith(listNN(h).name, ".onnx") - net = importONNXNetwork(benchmarkFolder+string(listNN(h).name), InputDataFormats="BC"); - % transform for matlab - if ~contains(listNN(h).name, "dubins") - Layers = net.Layers([1,4:end-1]); - net = dlnetwork(Layers); + if is_codeocean % error with swing (some internal operations not available when running -nodesktop) + modelname = split(listNN(h).name,'.'); + net = load(benchmarkFolder+string(modelname{1})+".mat"); + net = net.net; else - Layers = net.Layers; - ils = []; - for k=1:length(Layers)-1 - if isa(Layers(k), "nnet.onnx.layer.ElementwiseAffineLayer") - Layers(k-1).Bias = Layers(k).Offset; - else - ils = [ils k]; + net = importONNXNetwork(benchmarkFolder+string(listNN(h).name), InputDataFormats="BC"); + % transform for matlab + if ~contains(listNN(h).name, "dubins") + Layers = net.Layers([1,4:end-1]); + net = dlnetwork(Layers); + else + Layers = net.Layers; + ils = []; + for k=1:length(Layers)-1 + if isa(Layers(k), "nnet.onnx.layer.ElementwiseAffineLayer") + Layers(k-1).Bias = Layers(k).Offset; + else + ils = [ils k]; + end end + net = dlnetwork(net.Layers(ils)); end - net = dlnetwork(net.Layers(ils)); end nn = matlab2nnv(net); % store networks @@ -39,11 +45,5 @@ t = toc(t); names2idxs = containers.Map(names,idxs); disp("All networks are loaded in " + string(t) + " seconds"); - % Remove extra files - try - rmdir +cartpole s - end - try - rmdir +lunarlander s - end + end diff --git a/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/onnx/cartpole.mat b/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/onnx/cartpole.mat new file mode 100644 index 0000000000..801a180936 Binary files /dev/null and b/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/onnx/cartpole.mat differ diff --git a/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/onnx/dubinsrejoin.mat b/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/onnx/dubinsrejoin.mat new file mode 100644 index 0000000000..493e1c8d57 Binary files /dev/null and b/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/onnx/dubinsrejoin.mat differ diff --git a/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/onnx/lunarlander.mat b/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/onnx/lunarlander.mat new file mode 100644 index 0000000000..a1ab594244 Binary files /dev/null and b/code/nnv/examples/NNV2.0/Submission/CAV2023/NNV_vs_MATLAB/rl_benchmarks/onnx/lunarlander.mat differ diff --git a/code/nnv/examples/NNV2.0/Submission/CAV2023/RNN/create_figure.m b/code/nnv/examples/NNV2.0/Submission/CAV2023/RNN/create_figure.m index 9e76e1a17f..90725d3601 100644 --- a/code/nnv/examples/NNV2.0/Submission/CAV2023/RNN/create_figure.m +++ b/code/nnv/examples/NNV2.0/Submission/CAV2023/RNN/create_figure.m @@ -40,7 +40,11 @@ function create_figure() ax.XAxis.FontSize = 15; % Set font size of axis ax.YAxis.FontSize = 15; % save plot - exportgraphics(f, "rnn_verification_time.pdf", "ContentType","vector"); + if is_codeocean + exportgraphics(f,'/results/logs/rnn_verification_time.pdf', 'ContentType', 'vector'); + else + exportgraphics(f, "rnn_verification_time.pdf",'ContentType', 'vector'); + end end