How can I pass the performance parameters to my own custom performance function in the Neural Network Toolbox?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 18 Okt. 2013
Beantwortet: MathWorks Support Team
am 29 Okt. 2013
How can I pass the performance parameters to my own custom performance function in the Neural Network Toolbox?
Akzeptierte Antwort
MathWorks Support Team
am 18 Okt. 2013
For releases of MATLAB prior to MATLAB 8.0 (R2012b), the MSEREG function within the Neural Network Toolbox is a good example of a performance function using the performance parameters.
1) The custom performance function should have a header that looks like:
function perf= myperfFcn(e, x, pp)
where:
E - Matrix or cell array of error vector(s).
X - Vector of all weight and bias values.
PP - Performance parameter structure.
2) To specify your custom performance function:
net.performFcn = 'myperfFcn'
3) To specify your custom performance parameters:
perfStruct.varA = 1;
perfStruct.varB = 2;
net.performParam = perfStruct;
Note the "net" structure will now include:
parameters:
adaptParam: .passes
initParam: (none)
performParam: .varA, .varB
For releases of MATLAB starting in MATLAB 8.0 (R2012b), information is provided by the command,
>> help nncustom
For example, to specify a custom performance function, execute the command,
>> which mse
to locate the 'mse' function. Copy and rename the file 'mse.m' and the folder '+mse'. Then, use these functions as templates to write your own custom function.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Deep Learning Toolbox 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!