필터 지우기
필터 지우기

Solving ODE using Deep Learning

조회 수: 11 (최근 30일)
Mohd Jamil Mohamed Mokhtarudin
Mohd Jamil Mohamed Mokhtarudin 2023년 9월 12일
답변: Antoni Woss 2023년 9월 14일
Hi all,
I am trying to understand how to solve ODE using Deep Learning, and code it using MATLAB, based on this tutorial:
When I modified the code to solve a Lotka-Volterra model:
I could not get the loss to converge. I think it is because the tutorial uses sgdmupdate optimizer. If I want to change it to adam optimizer, how can I change the code?

답변 (1개)

Antoni Woss
Antoni Woss 2023년 9월 14일
To use the adam optimizer in this custom training loop example, you can follow the example set out in the documentation page for the adamupdate function - https://uk.mathworks.com/help/deeplearning/ref/adamupdate.html.
Note that the adamupdate function has some different required input arguments and return arguments so you will need to map the differences to the ODE example you are trying to solve. For example, initializing empty averageGrad and averageSqGrad outside the custom training loop so that you can update it at each call to adamupdate. Here is a snippet just showing where these quantites would be used.
averageGrad = [];
averageSqGrad = [];
...
[net,averageGrad,averageSqGrad] = adamupdate(net,gradients,averageGrad,averageSqGrad,iteration);

카테고리

Help CenterFile Exchange에서 Support Vector Machine Regression에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by