How can I pass the performance parameters to my own custom performance function in the Neural Network Toolbox?
1 回表示 (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2013 年 10 月 18 日
回答済み: MathWorks Support Team
2013 年 10 月 29 日
How can I pass the performance parameters to my own custom performance function in the Neural Network Toolbox?
採用された回答
MathWorks Support Team
2013 年 10 月 18 日
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!