pihnn.utils#
Utilities for building and training PIHNNs.
Functions#
|
Convert the input value to the unified format (i.e., complex
torch.tensor ). |
|
Convert the input function to the unified format (i.e., callable: complex
torch.tensor -> complex torch.tensor ). |
|
Compute the derivative \(\frac{df}{dz}\) through PyTorch automatic differentiation. |
|
Mean squared error (MSE). Equivalent to torch.nn.MSELoss() except it takes into account empty inputs. |
|
Evaluation of the loss function as Mean squared error (MSE). |
|
Called by |
|
Called by |
|
Performs the training of the neural network. |
|
Compute and print to screen the approximated relative \(L^p\) error between a model and a reference solution. I.e., |