visnet.m in pca_ann.rar
Sponsored links
function visnet(net,p_e_flag,imdmatrix)
%------------------------------------------------------------
% visnet(net,p_e_flag,imdmatrix)
%
% Just a NN's weights visualization function
% ->net = already trained network
% ->imdmatrix = a 1x2 vector which has the exact dimensions
% of images, used for weights' visualization.
%
% Algorithm:
% Standard matlab plotting stuff.
%
% ------------------/* Avraam Kasapis 2003 *\------------------
%Get & print final weights for all output neurons.
sizo=net.numLayers;
for i=1:sizo
matbias{i} = net.b{i}; %scale(min(net.b{i}(:)),max(net.b{i}(:)),0,255,net.b{i},0);
end
lmatwe = net.LW{2,1}; %scale(min(net.LW{2,1}(:)),max(net.LW{2,1}(:)),0,255,net.LW{2,1},0);
imatwe = net.IW{1,1}; %scale(min(net.IW{1,1}(:)),max(net.IW{1,1}(:)),0,255,net.IW{1,1},0);
%Future enhancement code
% scrsz = get(0,'ScreenSize');
% figure('Position',[1 scrsz(4)/2 scrsz(3)/2 scrsz(4)/2]);
handle_fig1 = figure('Positi
...
...
... to be continued.
This is a preview. To get the complete source file,
please click here to download the whole source code package.