Neural Network compability problems

조회 수: 1 (최근 30일)
KVTL
KVTL 2015년 4월 23일
편집: Greg Heath 2015년 8월 23일
Hi
I have a problem regarding training a simple neural network in matlab 2014b, my code works perfectly well in 2010b. But when running it in 2014b the performance goes to infinity, and the training stops after first iteration due to reaching maximum mu value. The (very simple) code can be seen below. The inputs to the network are voltage decays, each column containing 20 values, the target value is the noise amplitude on the decay.
Any ideas as to what goes wrong?
Edit. Annoyingly the training works if I use completely random target values, but not with random inputs :-/. So the problem must somehow be related to the targets, are there maybe some differences in allowed targets between 2010 and 2014?
N=32%number of threads used in training
maxNumCompThreads(N)
set=importdata('set.txt',' ');
amps=importdata('abs_noise_amp.txt',' ')';
inputs = sign(set).*log10(abs(set));
targets = log10(abs(amps'));
% inputs = rand(20,1000);
% targets = rand(1,1000);
% Create a Fitting Network
hiddenLayerSize = 50;
net = feedforwardnet(hiddenLayerSize);
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
% Train the Network
[net,tr] = train(net,inputs,targets);
% Test the Network
outputs = net(inputs);
errors = gsubtract(targets,outputs);
performance = perform(net,targets,outputs)
% View the Network
%view(net)
% Plots
% Uncomment these lines to enable various plots.
% figure, plotperform(tr)
%figure, plottrainstate(tr)
%figure, plotfit(net,inputs,targets)
% figure, plotregression(targets,outputs)
% figure, ploterrhist(errors)
save net
  댓글 수: 2
weng
weng 2015년 8월 21일
Dear Sir: I meet the same problem, among R2009b and R2013b. I use neural network for classification. What's the reason?
Greg Heath
Greg Heath 2015년 8월 23일
편집: Greg Heath 2015년 8월 23일
Data? Error messages?
Does the problem occur with MATLAB data?
help nndatasets
doc nndatasets
Greg

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by