Model#
- class pinnx.nn.Model(input, approx, output, *args)[source]#
A neural network approximator.
- Parameters:
input (
DictToArray) – The input check.approx (
Module) – The neural network model.output (
ArrayToDict) – The output unit.
- gradient(inputs, order, y=None, *xi)[source]#
Compute the gradient of the approximator.
- Parameters:
- Returns:
The gradient of the approximator.
- hessian(inputs, y=None, xi=None, xj=None)[source]#
Compute the Hessian of the approximator.
Compute: H[y][xi][xj] = d^2y / dxi dxj = d^2y / dxj dxi