NEML2 2.0.0
|
A thin wrapper around neml2::Model
TensorValue __getattr__ | ( | self, | |
str | arg0 ) |
Get a model parameter given its name
None __setattr__ | ( | self, | |
str | arg0, | ||
tensors.Tensor | arg1 ) |
Set the value for a model parameter
str __str__ | ( | self | ) |
dict[LabeledAxisAccessor, dict[LabeledAxisAccessor, dict[LabeledAxisAccessor, tensors.Tensor]]] d2value | ( | self, | |
dict | arg0 ) |
dict[str, Model] dependency | ( | self | ) |
Get the dictionary describing this model's dependency information, if any.
dict[LabeledAxisAccessor, dict[LabeledAxisAccessor, tensors.Tensor]] dvalue | ( | self, | |
dict | arg0 ) |
tuple[dict[LabeledAxisAccessor, dict[LabeledAxisAccessor, tensors.Tensor]], dict[LabeledAxisAccessor, dict[LabeledAxisAccessor, dict[LabeledAxisAccessor, tensors.Tensor]]]] dvalue_and_d2value | ( | self, | |
dict | arg0 ) |
TensorValue get_parameter | ( | self, | |
str | arg0 ) |
Get a model parameter given its name
LabeledAxis input_axis | ( | self | ) |
Input axis of the model. The axis contains information on variable names and their associated slicing indices.
tensors.TensorType input_type | ( | self, | |
LabeledAxisAccessor | 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 | ) |
Input axis of the model. The axis contains information on variable names and their associated slicing indices.
tensors.TensorType output_type | ( | self, | |
LabeledAxisAccessor | variable ) |
Introspect the underlying tensor type of an output variable. @returns tensors.TensorType
None set_parameter | ( | self, | |
str | arg0, | ||
tensors.Tensor | arg1 ) |
Set the value for a model parameter
None set_parameters | ( | self, | |
dict[str, tensors.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[LabeledAxisAccessor, tensors.Tensor] value | ( | self, | |
dict | arg0 ) |
tuple[dict[LabeledAxisAccessor, tensors.Tensor], dict[LabeledAxisAccessor, dict[LabeledAxisAccessor, tensors.Tensor]]] value_and_dvalue | ( | self, | |
dict | arg0 ) |
tuple[dict[LabeledAxisAccessor, tensors.Tensor], dict[LabeledAxisAccessor, dict[LabeledAxisAccessor, tensors.Tensor]], dict[LabeledAxisAccessor, dict[LabeledAxisAccessor, dict[LabeledAxisAccessor, tensors.Tensor]]]] value_and_dvalue_and_d2value | ( | self, | |
dict | arg0 ) |