From e1d003f2d2a1296cee40cc39afb0cc179851b195 Mon Sep 17 00:00:00 2001 From: Diego Manzanas Date: Mon, 5 Aug 2024 09:56:23 -0500 Subject: [PATCH] Fix bug checkRobust --- code/nnv/engine/nn/NN.m | 2 +- code/nnv/engine/set/ImageStar.m | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/code/nnv/engine/nn/NN.m b/code/nnv/engine/nn/NN.m index a40891212..e79136353 100644 --- a/code/nnv/engine/nn/NN.m +++ b/code/nnv/engine/nn/NN.m @@ -369,7 +369,7 @@ nr = length(outputSet); R = Star; for s=1:nr - R = outputSet(s).toStar; + R(s) = outputSet(s).toStar; end else R = outputSet; diff --git a/code/nnv/engine/set/ImageStar.m b/code/nnv/engine/set/ImageStar.m index 020bf56bc..ec05645ec 100644 --- a/code/nnv/engine/set/ImageStar.m +++ b/code/nnv/engine/set/ImageStar.m @@ -511,17 +511,19 @@ end function image = recurrentMap(obj, h_t_1, inputWeight, recurrentWeight, bias) - n = obj.numPred; - N = obj.height*obj.width*obj.numChannel; - for i=1:n+1 - I = in_image.V(:,:,:,i); - %I = reshape(I,N,1); % flatten input - if i==1 - V(1, 1,:,i) = double(inputWeight)*I + double(recurrentWeight)*h_t_1 + double(bias); - else - V(1, 1,:,i) = double(inputWeight)*I; - end - end + % Whoever implemented this, did not use it as it would return an error + % n = obj.numPred; + % N = obj.height*obj.width*obj.numChannel; + % for i=1:n+1 + % I = in_image.V(:,:,:,i); + % %I = reshape(I,N,1); % flatten input + % if i==1 + % V(1, 1,:,i) = double(inputWeight)*I + double(recurrentWeight)*h_t_1 + double(bias); + % else + % V(1, 1,:,i) = double(inputWeight)*I; + % end + % end + error("Not supported yet."); end function image = HadamardProduct(obj, I)