phlower.settings.ModuleSetting¶
- class phlower.settings.ModuleSetting(*, nn_type, name, input_keys=<factory>, output_key='', destinations=<factory>, no_grad=False, nn_parameters=<factory>, coeff=1.0, debug_parameters=<factory>)[source]¶
Bases:
IModuleSetting
,BaseModel
Methods
get_destinations
()get_input_keys
()get_name
()get_output_info
()resolve
(*resolved_outputs[, parent])Attributes
model_computed_fields
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_extra
Get extra fields set during validation.
model_fields
model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
name of neural network type.
name of group
key names of input variables
key names of output variables
name of destination modules.
A Flag not to calculate gradient.
parameters for neural networks.
coefficient to be applied to the module.
parameters to debug networks.
- Parameters:
nn_type (str)
name (str)
input_keys (list[str])
output_key (str)
destinations (list[str])
no_grad (bool)
nn_parameters (Annotated[IPhlowerLayerParameters, PlainValidator(func=~phlower.settings._module_parameter_setting._validate, json_schema_input_type=~typing.Any), PlainSerializer(func=~phlower.settings._module_parameter_setting._serialize, return_type=PydanticUndefined, when_used=always)])
coeff (float)
debug_parameters (PhlowerModuleDebugParameters)
- coeff: float¶
coefficient to be applied to the module.
- debug_parameters: PhlowerModuleDebugParameters¶
parameters to debug networks.
- destinations: list[str]¶
name of destination modules.
- input_keys: list[str]¶
key names of input variables
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
name of group
- nn_parameters: PhlowerModuleParameters¶
parameters for neural networks. Allowed items depend on nn_type.
- nn_type: str¶
name of neural network type. For example, GCN, MLP.
- no_grad: bool¶
A Flag not to calculate gradient. Defauls to False.
- output_key: str¶
key names of output variables