Skip to main content
. 2022 Sep 6;24(9):1254. doi: 10.3390/e24091254
Algorithm 1: Dynamic weights strategy for PINNs
Step1:SetTrainingstepsK,thelearningrateη,ηw,initialvaluesbalanceweightsw=wu,w0,wb,wfandneuralnetworkparametersΘ˜.Step2:Consideraphysics-informedneuralnetworktodefinetheweightedlossfunctionJΘ˜,wu,w0,wb,wfbasedon().Step3:ThenuseKstepsofagradientdescentalgorithmtoupdatetheparameterswandΘ˜as:fork=1toKdoifMSE0k+1<MSE0kandMSEuk+1<MSEukandMSEbk+1<MSEbkandMSEfk+1<MSEfkTunethebalanceweightswviaAdamtomaximizethemeetingconstraintswk+1Adam1Jwk;Θ˜;K;η;ηwUpdatetheparametersΘ˜viaAdamtominimizeJΘ˜k+1Adam2Jwk;Θ˜k;K;η;ηwendfor