enc.m in pca_ann.rar


face recognition using pca and ann wih training and testing and validation priv...Original Link
    Sponsored links

			
function onet = enc(inputsize,mimax,hneurons,fcnCELL,initflag,trainalgo,paramatrix,sameWEIGHT)
%------------------------------------------------------------
% onet = enc(inputsize,scala,hneurons,fcnCELL,initflag,trainalgo,paramatrix)
%
%
% Creates and initializes a neural network with given parameters.
%
% ->inputsize = size of input data.(actually the total number of
% pixels in our images)
% ->std_norm = 1 if we want to normalize inputs with mean=0 and std=1, 0 otherwise.
% ->mimax = minimum & maximum value of all returned matrices (use when initializing a net)
% ->hneurons = number of neurons at hidden layer.
% ->fcnCELL= a 1x2 vector with the names of the transfer functions
% at hidden and output layer.
% ->initflag = a 1x2 vector with the desired initialization method
% at hidden and output layer.(0=zero weights, 1=random).
% ->trainalgo = name of the training algorithm (for now gradient
% descent and gradient descent with momentum are supported).
% ->paramatrix = a 1x4 matrix. 1st=epochs, 2nd=show, 3rd=learning
% rate and 4th=momentum term.
% ->sameWEIGHT= if not [] then weights are initialized using this matrix
%
% Algorithm:
% Standard neural network initialization
%
% ------------------/* Avraam Kasapis 2003*\------------------
%create min & max values Rx2 matrix for inputs!
mm = ones(inputsize,2);
mm = [mm(:,1).*mimax(1) mm(:,2).*mimax(2)];
%create the fully connected feed-forward network.
onet=newff(mm,[hneurons,4]);
%define Transfer function for the 2 layers
onet.layers{1}.transferFcn = fcnCELL{			

			...
			...
			... to be continued.

  This is a preview. To get the complete source file, 
  please click here to download the whole source code package.

			
			


Project Files

    Sponsored links
NameSizeDate
 accuracy.m2.80 kB07-02-09 23:50
 enc.m3.05 kB07-02-09 23:49
 filevector.m1.27 kB06-02-09 13:29
 getdata.m2.24 kB06-02-09 16:37
 prepcaCOV.m1.48 kB07-02-09 23:48
 readpgm.m908.00 B10-02-09 10:39
 redata.m3.11 kB07-02-09 23:35
 scale.m654.00 B07-02-09 23:48
 scripto.m4.39 kB08-02-09 00:02
 visnet.m1.86 kB07-02-09 23:51
 writepgm.m797.00 B06-02-09 15:10
 <nn>0.00 B04-04-09 22:03
...

Related Items

    Sponsored links