Error: FCN does not return an info object.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have this code:
rng('default')
x = input;
t = output;
trainFcn = 'traingdm'; % Gradient descent with momentum backpropagation.
% Create a Fitting Network
hiddenLayerSize = 50;
net = fitnet(hiddenLayerSize,trainFcn);
% Setup Division of Data for Training, Validation, Testing
net.divideFcn = 'dividerand';
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
net.trainParam.epochs = 10000;
net.trainParam.lr = 0.01;
net.trainParam.mc = 0.9;
% Train the Network
[net,tr] = train(net,x,t);
% Test the Network
y = net(x);
e = gsubtract(t,y);
performance = perform(net,t,y)
% View the Network
view(net)
But when I run it I get this error:
Error using fitnet (line 69)
FCN does not return an info object.
Error in traingdm (line 20)
net = fitnet(hiddenLayerSize,trainFcn);
What part am I doing wrong?
0 Kommentare
Antworten (1)
CLHE
am 17 Mär. 2020
try to use only net=fitnet, delete the bracket. it should run fine.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Define Shallow Neural Network Architectures finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!