|
NEML2 2.0.0
|
The canonical type for constitutive models in NEML2.
Public Member Functions | |
| TensorValue | __getattr__ (self, str arg0) |
| None | __setattr__ (self, str arg0, Tensor arg1) |
| str | __str__ (self) |
| dict[str, Model] | dependency (self) |
| dict[VariableName|str, dict[VariableName|str, Tensor]] | dvalue (self, dict arg0) |
| TensorValue | get_parameter (self, str arg0) |
| LabeledAxis | input_axis (self, bool setup=False) |
| tensors.TensorType | input_type (self, str variable) |
| dict[str, TensorValue] | named_buffers (self) |
| dict[str, TensorValue] | named_parameters (self) |
| dict[str, Model] | named_submodels (self) |
| LabeledAxis | output_axis (self, bool setup=False) |
| tensors.TensorType | output_type (self, str variable) |
| None | set_parameter (self, str arg0, Tensor arg1) |
| None | set_parameters (self, dict[str, Tensor] arg0) |
| None | to (self, *, torch.dtype dtype=..., torch.device device=..., bool requires_grad=False) |
| dict[VariableName|str, Tensor] | value (self, dict arg0) |
| tuple[dict[VariableName|str, Tensor], dict[VariableName|str, dict[VariableName|str, Tensor]]] | value_and_dvalue (self, dict arg0) |
| str | name (self) |
| str | type (self) |
| TensorValue __getattr__ | ( | self, | |
| str | arg0 ) |
Get a model parameter given its name
| None __setattr__ | ( | self, | |
| str | arg0, | ||
| Tensor | arg1 ) |
Set the value for a model parameter
| str __str__ | ( | self | ) |
| dict[str, Model] dependency | ( | self | ) |
Get the dictionary describing this model's dependency information, if any.
| dict[VariableName | str, dict[VariableName | str, Tensor]] dvalue | ( | self, | |
| dict | arg0 ) |
| TensorValue get_parameter | ( | self, | |
| str | arg0 ) |
Get a model parameter given its name
| LabeledAxis input_axis | ( | self, | |
| bool | setup = False ) |
Input axis of the model. The axis contains information on variable names and their associated slicing indices.
| tensors.TensorType input_type | ( | self, | |
| str | variable ) |
Introspect the underlying tensor type of an input variable. @returns tensors.TensorType
| str name | ( | self | ) |
Name of the model
| dict[str, TensorValue] named_buffers | ( | self | ) |
Get the model buffers. The keys of the returned dictionary are the buffers' names.
| dict[str, TensorValue] named_parameters | ( | self | ) |
Get the model parameters. The keys of the returned dictionary are the parameters' names.
| dict[str, Model] named_submodels | ( | self | ) |
Get the sub-models registered to this model
| LabeledAxis output_axis | ( | self, | |
| bool | setup = False ) |
Output axis of the model. The axis contains information on variable names and their associated slicing indices.
| tensors.TensorType output_type | ( | self, | |
| str | variable ) |
Introspect the underlying tensor type of an output variable. @returns tensors.TensorType
| None set_parameter | ( | self, | |
| str | arg0, | ||
| Tensor | arg1 ) |
Set the value for a model parameter
| None set_parameters | ( | self, | |
| dict[str, Tensor] | arg0 ) |
Set the values for multiple model parameters
| None to | ( | self, | |
| * | , | ||
| torch.dtype | dtype = ..., | ||
| torch.device | device = ..., | ||
| bool | requires_grad = False ) |
| str type | ( | self | ) |
Type of the model
| dict[VariableName | str, Tensor] value | ( | self, | |
| dict | arg0 ) |
| tuple[dict[VariableName | str, Tensor], dict[VariableName | str, dict[VariableName | str, Tensor]]] value_and_dvalue | ( | self, | |
| dict | arg0 ) |