NVIDIA Modulus Sym v1.2.0
Sym v1.2.0

Modulus Sym Validators

class modulus.sym.domain.validator.continuous.PointVTKValidator(vtk_obj: VTKBase, nodes: List[Node], input_vtk_map: Dict[str, List[str]], true_vtk_map: Dict[str, List[str]], invar: Dict[str, array] = {}, true_outvar: Dict[str, array] = {}, batch_size: int = 1024, plotter: Optional[ValidatorPlotter] = None, requires_grad: bool = False, log_iter: bool = False)[source]

Bases: PointwiseValidator

Pointwise validator using mesh points of VTK object

Parameters
  • vtk_obj (VTKBase) – Modulus VTK object to use point locations from

  • nodes (List[Node]) – List of Modulus Nodes to unroll graph with.

  • input_vtk_map (Dict[str, List[str]]) – Dictionary mapping from Modulus input variables to VTK variable names {“modulus.sym.name”: [“vtk name”]}. Use colons to denote components of multi-dimensional VTK arrays (“name”:# )

  • true_vtk_map (Dict[str, List[str]]) – Dictionary mapping from Modulus target variables to VTK variable names {“modulus.sym.name”: [“vtk name”]}.

  • invar (Dict[str, np.array], optional) – Dictionary of additional numpy arrays as input, by default {}

  • true_outvar (Dict[str, np.array], optional) – Dictionary of additional numpy arrays used to validate against validation, by default {}

  • batch_size (int) – Batch size used when running validation.

  • plotter (ValidatorPlotter) – Modulus plotter for showing results in tensorboard.

  • requires_grad (bool, optional) – If automatic differentiation is needed for computing results., by default True

  • log_iter (bool, optional) – Save results to different file each call, by default False

class modulus.sym.domain.validator.continuous.PointwiseValidator(nodes: List[Node], invar: Dict[str, array], true_outvar: Dict[str, array], batch_size: int = 1024, plotter: Optional[ValidatorPlotter] = None, requires_grad: bool = False)[source]

Bases: Validator

Pointwise Validator that allows walidating on pointwise data

Parameters
  • nodes (List[Node]) – List of Modulus Nodes to unroll graph with.

  • invar (Dict[str, np.ndarray (N, 1)]) – Dictionary of numpy arrays as input.

  • true_outvar (Dict[str, np.ndarray (N, 1)]) – Dictionary of numpy arrays used to validate against validation.

  • batch_size (int, optional) – Batch size used when running validation, by default 1024

  • plotter (ValidatorPlotter) – Modulus plotter for showing results in tensorboard.

  • requires_grad (bool = False) – If automatic differentiation is needed for computing results.

class modulus.sym.domain.validator.discrete.DeepONet_Data_Validator(nodes: List[Node], invar_branch: Dict[str, array], invar_trunk: Dict[str, array], true_outvar: Dict[str, array], batch_size: int = 100, plotter: Optional[DeepONetValidatorPlotter] = None, requires_grad: bool = False)[source]

Bases: _DeepONet_Validator

DeepONet Validator

class modulus.sym.domain.validator.discrete.DeepONet_Physics_Validator(nodes: List[Node], invar_branch: Dict[str, array], invar_trunk: Dict[str, array], true_outvar: Dict[str, array], batch_size: int = 100, plotter: Optional[DeepONetValidatorPlotter] = None, requires_grad: bool = False, tile_trunk_input: bool = True)[source]

Bases: _DeepONet_Validator

DeepONet Validator

class modulus.sym.domain.validator.discrete.GridValidator(nodes: List[Node], dataset: Dataset, batch_size: int = 100, plotter: Optional[GridValidatorPlotter] = None, requires_grad: bool = False, num_workers: int = 0)[source]

Bases: Validator

Data-driven grid field validator

Parameters
  • nodes (List[Node]) – List of Modulus Nodes to unroll graph with.

  • dataset (Dataset) – dataset which contains invar and true outvar examples

  • batch_size (int, optional) – Batch size used when running validation, by default 100

  • plotter (GridValidatorPlotter) – Modulus plotter for showing results in tensorboard.

  • requires_grad (bool = False) – If automatic differentiation is needed for computing results.

  • num_workers (int, optional) – Number of dataloader workers, by default 0

class modulus.sym.domain.validator.validator.Validator[source]

Bases: object

Validator base class

Previous Modulus Sym Inferencers
Next Modulus Sym Monitors
© Copyright 2023, NVIDIA Modulus Team. Last updated on Jan 25, 2024.