what is the purpose of each line of this code?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
This is a code for training Neural Network:
function [net]=createff(Iin,Target)
net = newff(Iin, Target, 10, {'logsig' 'logsig'}, 'trainscg');
net.trainParam.perf = 'sse';
net.trainParam.epochs = 500;
net.trainParam.goal = 1e-5;
net.trainParam.lr=0.15;
net.trainParam.mc=0.8;
net = init(net);
net = train(net, Iin, Target);
end
Please help me to understand this code.
1 Kommentar
Greg Heath
am 1 Jul. 2013
1. delete the net = init statement because newff is self-initializing.
2. Before using a code specifying various parameter values that overwrite default values, it is probably worth your while to try using as many defaults as possible. See the examples in
help newff
doc newff
Akzeptierte Antwort
Matthew Eicholtz
am 29 Jun. 2013
The first line creates a feed-forward backpropagation network. Type this in the command window to learn more:
help newff
- '10' is the size of the hidden layer
- 'logsig' is log sigmoid transfer function
- 'trainscg' is scaled conjugate gradient backpropagation
- 'sse' is sum of squared errors
- 'epochs' refers to how many times to run through the training and validation sets
- 'goal' is the stopping criterion
- 'lr' is the learning rate
- 'mc' is the momentum constant
The last two lines initialize and train the network.
help init
help train
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!