필터 지우기
필터 지우기

Training Option! How can we use a new defined algorithm (as a training function) to train a Deep Neural Network?!

조회 수: 2 (최근 30일)
Hi every one. This is the first time I am designing a deep network in Matlab. I do not want use SGD, Adam or default solver. I have a new algorithm (proposed unconstrained optimizar) that I am interested in using it to train the network to chech its performance in training. How can I do it? Is it possible to do, how?

채택된 답변

Srivardhan Gadila
Srivardhan Gadila 2020년 10월 30일
  댓글 수: 2
MAHSA YOUSEFI
MAHSA YOUSEFI 2020년 10월 31일
Yes! I finally found it. You are right. I am working on that. Thank you.
MAHSA YOUSEFI
MAHSA YOUSEFI 2020년 11월 10일
Dear Srivardhan,
following with your answer to use training loop, I have another problem.
I am trying to train a CNN with my own optimizer through costum training loop:
[loss,gradient]= dlfeval(@modelgradient,dlnet, Xtrian,YTrain)
myFun = @(dlnet,gradient,loss)myOptimizer(dlnet,gradient,loss,...)
dlnet = dlupdate(myFun,dlnet,gradient,loss)
My optimizer needs w (current parameter vector), g (its corresponding gradient vector), f (its corresponding loss value) and… as inputs. This optimizer needs many computations with w, g, f inside to give w = w + p, p is a optimal vector that my optimizer has to compute it by which I can update my w.
I need something by which I can convert the parameters and gradient of dl format to vectors for those computations inside of my optimizer, then to use above syntax I need to convert vector to dl formats required in loop and in my optimizer as well. This back and forth is necessary for my job for using training loop. Can you help to find functions in the toolbox to do these jobs (vector to table (because gradient and dlnet’s parameters are tables with dlarray cells) and vice versa), or any other solutions?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by