%%%%%%%%%%%%%%%%%%%%%%%%%%%%% From Hidden to output %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HH=floor((H+1)/2);
HHM=max(HH,2);
HHH=floor(H/2);
hh=0.5*ones(2,HH);
oo=zeros(5,5);
for i=1:1:2
for k=1:1:HH
hh(1,k)=1/(1+exp(-u(i,k)));
end
for k=1:1:HHH
hh(2,k)=1/(1+exp(-u(i,HH+k)));
end
subplot(3,HHM,i);
image(254*hh); hold on;
colormap(jet(255));
axis off;
axis ij;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% From Input to Hidden %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
oo=zeros(5,5);
for i=1:1:H
for j=1:1:5
for k=1:1:5
oo(j,k)=1/(1+exp(-w(i,5*(j-1)+k)));
end
end
subplot(3,HHM,i+HHM);
image(254*oo); hold on;
colormap(jet(255));
axis off;
axis ij;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
hold off;
drawnow;