Skip to content

Commit

Permalink
Improve reach star method
Browse files Browse the repository at this point in the history
  • Loading branch information
mldiego committed Sep 25, 2024
1 parent 53bdf2a commit 5ae592c
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions code/nnv/engine/nn/layers/FullyConnectedLayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,8 @@

n = in_image.numPred;
V(1, 1, :, in_image.numPred + 1) = zeros(obj.OutputSize, 1, 'like', in_image.V);
for i=1:n+1
I = in_image.V(:,:,:,i);
I = reshape(I,N,1); % flatten input
if i==1
V(1, 1,:,i) = obj.Weights*I + obj.Bias;
else
V(1, 1,:,i) = obj.Weights*I;
end
end
V(1, 1, :, :) = obj.Weights*reshape(in_image.V, N, n + 1);
V(1, 1, :, 1) = reshape(V(1, 1, :, 1), obj.OutputSize, 1) + obj.Bias;
% output set
image = ImageStar(V, in_image.C, in_image.d, in_image.pred_lb, in_image.pred_ub);
else % reach Star set
Expand Down

0 comments on commit 5ae592c

Please sign in to comment.