How to custom the perform function using neural network toolbox?
2 ビュー (過去 30 日間)
古いコメントを表示
I am using MATLAB R2015a and I would like to train a neural network with my own perform function. I followed all steps described in forums to do it :
1) I copied the mse.m and +mse folder from inside the matlab directory to my working directory and i renamed them as mymse.m and +mymse
2) I modified the function name inside the mymse.m file from:
function perf = mse(net,varargin)
to
function perf = mymse(net,varargin)
then building the net, i added my own performance function as
net.performFcn = 'mymse'
3) I left the .m functions inside the +mymse folder as they are since mymse function computes the mse. Note that I do not change mymse.m as I wish it, before changing the perform function I would like the program works by integrating mymse.m (working exactly like mse.m).
Finally the code doesn't work at all and I don't understand why. The result is always a flatline or crashes.
Could you help me in this task.
Thank you
Vincent
0 件のコメント
採用された回答
Søren Jensen
2015 年 4 月 29 日
Im by far not an expert, but here's what i would do:
1) make sure the directory you are working in is the right one
2) try copying your mymse.m files to the original matlab directory.. maybe the net can only search for performance functions here?
I don't know if you if you really need a custom performance function but if you surrender to matlab, here's a list of the premade performance functions:
mae - Mean absolute error performance function.
mse - Mean squared error performance function.
sae - Sum absolute error performance function.
sse - Sum squared error performance function.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Data Workflows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!