필터 지우기
필터 지우기

Physics informed Neural Network

조회 수: 25 (최근 30일)
Sankarganesh P
Sankarganesh P 2023년 7월 11일
댓글: Sankarganesh P 2023년 7월 27일
Dear Matlab Community Members,
i would like to apply my equations in physics-informed neural networks, so i reffered solving Burger's equation L-BFGS method. For example i would like to apply 1D equation
d^u/dt=(d^2g/dx^2)-d^4u/dx^4; where g=2*u*(1-u)*(1-2*u) with
u(x=0,t)=0, u(x=1,t)=0 and
u(t=0,x)=sin(4*pi*x/L)
Model Loss Function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
U = model(parameters,X,T);
G=2.*U.*(1-U).*(1-2.*U);
gradientsG = dlgradient(sum(G,"all"),{X,T},EnableHigherDerivatives=true);
Gx = gradientsG{1};
Gxx = dlgradient(sum(Gx,"all"),X,EnableHigherDerivatives=true);
gradientsU = dlgradient(sum(U,"all"),{X,T},EnableHigherDerivatives=true);
Ux = gradientsU{1};
Ut = gradientsU{2};
Uxx = dlgradient(sum(Ux,"all"),X,EnableHigherDerivatives=true);
Uxxx = dlgradient(sum(Uxx,"all"),X,EnableHigherDerivatives=true);
Uxxxx = dlgradient(sum(Uxxx,"all"),X,EnableHigherDerivatives=true);
f=Ut-Gxx+2.*Uxxxx;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
i have made the above changes in the code...but i didnt get any expected results....can u please help me with this...?
  댓글 수: 4
Ben
Ben 2023년 7월 26일
@Sankarganesh P I notice that your ODE is
but the model loss function uses 2.*Uxxxx. That seems like an issue at first glance.
Otherwise your model loss function looks as expected to me. Do you get good training losses?
Of course a small training loss only means the network is "nearly" solving the ODE at the training points - for complex ODEs/PDEs this may only give weak approximations to the true solution in general.
Sankarganesh P
Sankarganesh P 2023년 7월 27일
@Ben Thankz for the correction. i will try now... is it possible to use this LBFGS for 2D problems like d^2T/dx^2+d^2T/dy^2=DT/dt..?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by