Research Article
Exploring Physics-Informed Neural Networks for the Generalized Nonlinear Sine-Gordon Equation
Algorithm 1
PINN algorithm for NLSGE.
| | Require: Training data, collocation points , contains interior and boundary points. | | | Initial condition, boundary condition, and the NLSGE. | | (1) | Define network architecture (input layer, hidden layers, output layer, activation function, and optimizer). | | (2) | Initialize weights and biases , . | | (3) | for all epochs do | | (4) | apply forward propagation: | | (5) | compute the residual: | | (6) | compute loss: | | (7) | apply the optimizer: . | | (8) | end for |
|