Neural Network - How to use a custom training function

조회 수: 4 (최근 30일)
David Franco
David Franco 2018년 3월 25일
댓글: Carsten Daldrup 2020년 9월 25일
Is it possible to replace standard matlab training methods (like Gradient Descent, Levenberg-Marquardt, etc.) by other methods of global optimization, like Particle Swarm Optimization or Simulated Annealing?
I was looking at C:\Program Files\MATLAB\R2018a\toolbox\nnet\nnet\nntrain\... for some clues, but nothing comes up...
Attached are two original files of the mentioned training functions ( traingd and trainlm ).

답변 (2개)

Greg Heath
Greg Heath 2018년 3월 25일
Use the help and doc commands on
trainru
trainb
trainr
trainc
trains
trainbu
trainscg
traingdx
traingdm
traingd
trainbr
traingda
There may be more, my website search using "trainfcn" was very brief.
Thank you for formally accepting my answer
Greg
  댓글 수: 2
David Franco
David Franco 2018년 3월 25일
Yeah, I know all of these training functions.
My question is: Can I use my own custom training function and replace these MATLAB inbuilt?
Thanks!
Carsten Daldrup
Carsten Daldrup 2020년 9월 25일
Did you found something since then?

댓글을 달려면 로그인하십시오.


Sumaiya Ahmad
Sumaiya Ahmad 2019년 9월 10일
편집: Sumaiya Ahmad 2019년 9월 10일
I have not tried, but I think it might work,
Please try the following command:
net.trainFcn = 'custom_function_name';
where
net is your network name.
trainFcn is property to the name of the corresponding function
custom_function_name is training function defined by you
(I hope it might help you)

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by