phlower.settings.ModuleSetting¶
- class phlower.settings.ModuleSetting(*, nn_type, name, input_keys=<factory>, output_key='', destinations=<factory>, no_grad=False, nn_parameters_same_as=None, nn_parameters=<factory>, coeff=1.0, debug_parameters=<factory>)[source]¶
Bases:
IModuleSetting,BaseModelMethods
get_destinations()get_input_keys()get_name()get_output_info()resolve(*resolved_outputs[, parent])Attributes
model_computed_fieldsConfiguration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_extraGet extra fields set during validation.
model_fieldsmodel_fields_setReturns 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.
name of another module to copy nn_parameters.
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_same_as (str | None)
nn_parameters (Annotated[IPhlowerLayerParameters | dict, 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', 'validate_assignment': True}¶
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_parameters_same_as: str | None¶
name of another module to copy nn_parameters.
- 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