get_estep_params¶
- get_estep_params(module: Module, default: bool = False, exclude: Sequence[Parameter | Module] | None = None, recurse: bool = True) Iterator[Parameter][source]¶
Returns an iterator over E-step parameters.
- Parameters:
module (Module) – module from which to retrieve E-step parameters.
default (bool, optional) – if unspecified parameters should default to E-step parameters. Defaults to False.
exclude (Sequence[nn.Parameter | nn.Module] | None) – Defaults to None.
recurse (bool, optional) – if parameters that are not direct members should be included. Defaults to True.
remove_duplicate (bool, optional) – if duplicated parameters should be excluded. Defaults to True.
- Yields:
nn.Parameter – E-step parameter.
Note
Resolution is performed as follows:
if
_e_params_is defined and the identifier for a parameter is in_e_params_, then the parameter is included.if
_e_params_is not defined but_m_params_is, and the identifier is in_m_params_, then the parameter is excluded.if
_e_params_is not defined and_m_params_, if present, does not contain the identifier, then the parameter is included ifdefaultis true and excluded if it is false.
This resolution is performed on the combined
_e_params_from the given module’s class and all its superclasses.Note
The E-step parameters for a class that inherits from
Moduleare determined by the class attribute_e_params_, containing a dictionary of attribute names withNonevalues.