pinnx.nn module#
The pinnx.nn package contains framework-specific implementations for different
neural networks.
Users can directly import pinnx.nn.<network_name> (e.g., pinnx.nn.FNN), and
the package will dispatch the network name to the actual implementation according to the
backend framework currently in use.
Note that there are coverage differences among frameworks. If you encounter an
AttributeError: module 'pinnx.nn.XXX' has no attribute 'XXX' or ImportError:
cannot import name 'XXX' from 'pinnx.nn.XXX' error, that means the network is not
available to the current backend. If you wish a module to appear in DeepXDE, please
create an issue. If you want to contribute a NN module, please create a pull request.
This module provides neural network architectures for physics-informed learning, including feedforward networks, DeepONet for operator learning, and utilities for converting between array and dictionary representations.
Model Interfaces#
Core classes for building and managing neural network models.
NN: Base neural network interface.
Model: Wrapper for combining multiple network components.
DictToArray: Converts dictionary inputs (with units) to arrays.
ArrayToDict: Converts array outputs back to dictionaries (with units).
Base class for all neural network modules. |
|
A neural network approximator. |
|
DictToArray layer, scaling the input data according to the given units, and merging them into an array. |
|
Output layer, splitting the output data into a dict and assign the corresponding units. |
Neural Network Architectures#
Network architectures for function approximation and operator learning.
FNN: Fully-connected feedforward neural network.
PFNN: Parallel feedforward neural network with multiple outputs.
DeepONet: Deep Operator Network for learning nonlinear operators.
DeepONetCartesianProd: DeepONet with Cartesian product structure.
PODDeepONet: Proper Orthogonal Decomposition-enhanced DeepONet.
MIONetCartesianProd: Multiple-input operator network.
PODMIONet: POD-enhanced multiple-input operator network.
Fully-connected neural network. |
|
Parallel fully-connected network that uses independent sub-networks for each network output. |
|
Deep operator network. |
|
Deep operator network for dataset in the format of Cartesian product. |
|
Deep operator network with proper orthogonal decomposition (POD) for dataset in the format of Cartesian product. |
|
MIONet with two input functions for Cartesian product format. |
|
MIONet with two input functions and proper orthogonal decomposition (POD) for Cartesian product format. |