Nvidia Modulus Symbolic(Modulus Sym) Example
Modulus Symbolic Flow
Hydra
Hydra is a configuration package built into Modulus Sym. It lets users set hyperparameters (parameters that determine the neural network’s structure and govern its training) using configuration files in YAML (a standard human-readable text format). Hydra is the first component to be initialized when solving a problem using Modulus Sym. It directly influences all Modulus Sym components.
Geometry and Data
Modulus Sym provides both physics-informed and data-driven machine learning solutions for physics simulation problems. All these solutions depend on expressing the physics problem as a mathematical optimization problem. The mathematical optimization problem is, in turn, posed on a particular geometry and/or set of data. Modulus Sym’ geometry module lets users either build a geometry from scratch using primitives, or import an existing geometry from a mesh. For data-driven problems, Modulus Sym has multiple methods for accessing data, including standard in-memory datasets as well as lazy loading methods for large-scale datasets.
Nodes
In Modulus Sym, Nodes represent components that will be executed in the forward pass during training. A Node may wrap a torch.nn.Module and provides additional information regarding its needed input and output variables. This lets Modulus Sym build execution graphs and automatically fill in missing components to compute required derivatives. Nodes may contain models or functions such as PyTorch neural networks that are built into Modulus Sym, user-defined PyTorch networks, feature transformations, or even equations.
Domain
The Domain holds all Constraints as well as additional components needed in the training process. These additional components include Inferencers, Validators, and Monitors. When developing in Modulus Sym, Constraints that the user defines are then added to the training Domain to create a collection of training objectives.
Constraints
Constraints are the training objectives in Modulus Sym. A Constraint contains the loss function, and a set of Nodes from which Modulus Sym builds a computational graph for execution. Many physical problems need multiple training objectives in order for the problem to be well defined. Constraints provide the means for setting up such problems.