Skip to content

Commit

Permalink
Fix bug checkRobust
Browse files Browse the repository at this point in the history
  • Loading branch information
mldiego committed Aug 5, 2024
1 parent f06303b commit e1d003f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion code/nnv/engine/nn/NN.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
24 changes: 13 additions & 11 deletions code/nnv/engine/set/ImageStar.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e1d003f

Please sign in to comment.