MnistModel.register_parameter#
- MnistModel.register_parameter(name: str, param: Optional[Parameter]) None #
Adds a parameter to the module.
The parameter can be accessed as an attribute using given name.
- Args:
- name (string): name of the parameter. The parameter can be accessed
from this module using the given name
- param (Parameter or None): parameter to be added to the module. If
None
, then operations that run on parameters, such ascuda
, are ignored. IfNone
, the parameter is not included in the module’sstate_dict
.