

%%net=network; % Create a custom neural network

net.numInputs  = 2;                         %%% 2 onafhankelijke inputs
net.numLayers  = 3;                         %%% 1 hidden layers + output unit

net.biasConnect = [0; 0; 0];                %%% all layers have bias
net.inputConnect = [1 0; 0 1; 0 0];         %%% connect the 1th input to 1th hidden layer
                                            %%% connect the 2th input to the 2th hidden layer
                                                    
net.layerConnect = [0 0 0; 1 0 0; 0 1 0];   %%% connect 1st hidden to 2nd hidden
                                            %%% connect 2nd hidden to 3th layer

net.outputConnect = [0  0  1];              %%% Connect  3nd layer to network output
                                                    


net.inputs{1}.size=2*Nfreq %%%size 1st input:cochlea 2*Nfreq
%net.inputs{1}.range=[  input_range(1,:) ;  input_range(2,:)];
       
net.inputs{2}.size=2*Nmsc %%%size 2st input: eyepos 2*Nmsc
%net.inputs{2}.range=[  input_range(3,:) ];

net.layers{1}.size=4%Naud;  %%%%% NUMBER OF UNITS FIRST HIDDEN LAYER
net.layers{1}.initFcn = 'initnw';
net.layers{1}.transferFcn = 'tansig';


net.layers{2}.size=Nhidden;
net.layers{2}.initFcn = 'initnw';
net.layers{2}.transferFcn = 'tansig';

net.layers{3}.size=Nmot
net.layers{3}.initFcn = 'initnw';
net.layers{3}.transferFcn = 'purelin';

net.adaptFcn= 'trains';
net.initFcn=  'initlay';   %Layer-by-layer network initialization function.
net.performFcn= 'mse';
net.trainFcn= 'trainbr';
%net.trainFcn= 'trainlm';





% IW1=net.IW{1,1};
% IW2=net.IW{2,2};
% LW=net.LW{2,1};
% 
% 
% size(IW1)
% size(IW2)
% size(LW)
