Info

此问题已关闭。 请重新打开它进行编辑或回答。

getting the same results for consecutive training

1 次查看(过去 30 天)
hello
I am going to get exactly the same result for consecutive training of my NN. Every time I train my net the result is different. could you please help me?
[x,t]=bodyfat_dataset;
>> Inputs=cell(1,3);
Targets=cell(1,3);
for i=1:3
Ind=randi(size(x,2),size(x,2),1);
Inputs{i} = x(:, Ind);
Targets{i}=t(Ind);
end
>> ytotal=0;
>> y=zeros(3,252);
>> net=feedforwardnet;
>> net.divideFcn='';
>> for i=1:3
rng(0);
[net tr y(i,:)]=train(net,Inputs{i},Targets{i});
ytotal=ytotal+y(i,:);
end
..............................
%for the second round of training
ytotal=0;
y=zeros(3,252);
for i=1:3
rng(0);
[net tr y(i,:)]=train(net,Inputs{i},Targets{i});
ytotal=ytotal+y(i,:);
end
% the result is different!!!
I have used divideind with early stopping but it did not solve my problem.
best

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by