Combine Bayesian regularization (trainbr) training algorithm with weight regularization.

조회 수: 1 (최근 30일)
Hi everyone.
I want to ask is it okay to train a neural network using trainbr algorithm combine with network regularization in matlab? I try to use this idea, and the result is my training always stop due to reach mu_max. If I used trainbr only the train will stop due to max epoch or max validation fail.
Here is the code that I used:
TOL=0;
net = network;
net.numInputs = 1;
net.numLayers = 6;
net.biasConnect = [1;1;1;1;1;1];
net.inputConnect = [1;1;0;0;0;0];
net.layerConnect = [0 0 0 0 0 0;
0 0 0 0 0 0;
1 1 0 0 0 0;
0 0 1 0 0 0;
0 0 1 0 0 0;
0 0 0 1 1 0];
net.outputConnect = [0 0 0 0 0 1];
net.targetConnect = [0 0 0 0 0 1];
net.inputs{1}.range = ones(NID,2);
net.inputs{1}.range(:,1) = -1;
net.layers{1}.size = NNIL;
net.layers{1}.transferFcn = TFIL1;
net.layers{1}.initFcn = 'initnw';
net.layers{2}.size = NNIL;
net.layers{2}.transferFcn = TFIL2;
net.layers{2}.initFcn = 'initnw';
net.layers{3}.size = NLPC;
net.layers{3}.transferFcn = TFIL3;
net.layers{3}.initFcn = 'initnw';
net.layers{4}.size = NNIL;
net.layers{4}.transferFcn = TFIL1;
net.layers{4}.initFcn = 'initnw';
net.layers{5}.size = NNIL;
net.layers{5}.transferFcn = TFIL2;
net.layers{5}.initFcn = 'initnw';
net.layers{6}.size = NID;
net.layers{6}.transferFcn = TFIL3;
net.layers{6}.initFcn = 'initnw';
net.initFcn = 'initlay';
net.performFcn = 'mse';
net.performParam.regularization = 0.000001;
net.trainFcn = 'trainbr';
net.trainParam.epochs = 2000;
net.trainParam.min_grad = 0;
net.trainParam.minstep = 0;
net.trainParam.max_fail = 200;
net=init(net);
net.trainParam.goal = TOL;
net.divideFcn = 'divideind';
net.divideParam.trainInd = TrainIdx;
net.divideParam.valInd = ValIdx;
net.divideParam.testInd = TestIdx;
[net,tr,Y,E,Pf,Af] = train(net,Data_All,Data_All);
Thank you very much for your attention.
  댓글 수: 1
Arygianni Valentino
Arygianni Valentino 2018년 3월 30일
Forget to mention, when I run this code, there is a message from matlab,
TRAINBR: NET.performParam.regularization has been set to 0.
Maybe someone can help me what does this mean?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Networks에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by