Expand description
GPU neural network solver for physics (CPU mock backend).
Provides a multi-layer perceptron (MLP) framework and physics-informed neural network (PINN) utilities:
NeuralLayer: single dense layer with several activation modes.GpuNeuralSolver: stacked MLP forward pass.PhysicsNeuralNet: PINN wrapper with PDE + boundary-condition loss.- Activation functions:
ns_relu,ns_sigmoid,ns_softmax. - Loss functions:
ns_mse_loss,ns_mae_loss. - PINN residuals:
pinn_residual,pinn_boundary_loss.
Structs§
- GpuNeural
Solver - Multi-layer perceptron running on the CPU mock GPU backend.
- Neural
Layer - A single fully-connected (dense) neural network layer.
- Physics
Neural Net - Physics-informed neural network (PINN).
Functions§
- ns_
mae_ loss - Mean absolute error loss:
mean(|predicted_i − target_i|). - ns_
mse_ loss - Mean-squared error loss:
mean((predicted_i − target_i)²). - ns_relu
- Rectified linear unit activation:
max(0, x). - ns_
sigmoid - Logistic sigmoid activation:
1 / (1 + e^{-x}). - ns_
softmax - Softmax of a slice: normalised exponentials
exp(x_i) / Σ exp(x_j). - pinn_
boundary_ loss - Boundary-condition loss: MSE between the predicted boundary values and the prescribed Dirichlet data.
- pinn_
residual - Physics-informed residual for the 1-D Poisson equation
−u_xx = source.