How to train neural network using newff with a custom loss function?

9 ビュー (過去 30 日間)
Rah Yoonhyuk
Rah Yoonhyuk 2020 年 2 月 4 日
回答済み: Hiro Yoshino 2020 年 2 月 4 日
I want to train a neural network (f) with input A and output B. I want to train it with the loss function between g(f(A)) and C where g is a pre-trained neural network. C is another data set. How can I use a custom loss function? Are there any other functions other than newff? Below is my code (very simple)
net = newff(minmax(A),[10,51],{'logsig','purelin','trainlm'});
net.trainparam.goal = 0;
net.trainparam.lr = 0.01;
net = train(net, A, B);

回答 (1 件)

Hiro Yoshino
Hiro Yoshino 2020 年 2 月 4 日
Which version are you using?
Looks like there is no such a function.

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by