基于matlab性能问题的神经网络
我正在使用此代码进行NN,以便训练我的网络,使其能够对图像进行分类:基于matlab性能问题的神经网络,matlab,Matlab,我正在使用此代码进行NN,以便训练我的网络,使其能够对图像进行分类: net = newff(p,t,15,{},'traingd'); net.divideParam.trainRatio = 70/100; % Adjust as desired net.divideParam.valRatio = 15/100; % Adjust as desired net.divideParam.testRatio = 15/100; % Adjust as desired net.trainP
net = newff(p,t,15,{},'traingd');
net.divideParam.trainRatio = 70/100; % Adjust as desired
net.divideParam.valRatio = 15/100; % Adjust as desired
net.divideParam.testRatio = 15/100; % Adjust as desired
net.trainParam.epochs = 10000;
net.trainParam.goal = 0.01;
net.trainParam.show = 25;
net.trainParam.time = inf;
net.trainParam.min_grad = 1e-10;
net.trainParam.max_fail = 10;
net.trainParam.sigma = 5.0e-5;
net.trainParam.lambda = 5.0e-7;
net.trainParam.mu_max = 1e-20;
net.trainParam.lr = 0.001;
% Train and Apply Network
[net,tr] = train(net,p,t);
outputs = sim(net,p);
% Create P.
% Plot
plotperf(tr)
plotfit(net,p,t)
plotregression(t,outpts)
但我的表现从未低于0.5。尝试对数据进行PCA,但我认为代码中存在不正确的地方?是否可以更改nntraintool上显示的性能初始值
多谢各位
保罗如果没有你的数据很难说,但根据我对神经网络的经验,只有一件事可能发生:
initnw
中)
如果是4,请找出您的数据为何如此,并修复它
感谢@sazary在使用
newff
或newcf
创建新网络时指出了一些有关默认值initnw
的详细信息 谢谢你的帮助,克里斯。我在1、5、10和15小时内进行训练,但仍然没有反馈。我会试试你的建议你试过降低net.trainParam.lr吗?是的。但这可能很愚蠢,你认为这和重量有关吗?有两次网络运行时没有任何改变。由于搜索空间的复杂性,你很可能正在达到局部极小值。您是否尝试使用类似于nwinit
的东西初始化网络?根据我的经验,这种方法可以产生更一致的结果。此外,当您使用newff
时,它会自动调用。这来自matlab的帮助:您可以通过调用newff或newcf创建使用initnw的标准网络