Module — PyTorch 1.10.1 documentation
pytorch.org › docs › stableParameters. 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 as cuda, are ignored. If None, the parameter is not included in the module’s state_dict.
Parameter — PyTorch 1.10.1 documentation
pytorch.org › torchParameter¶ class torch.nn.parameter. Parameter (data = None, requires_grad = True) [source] ¶. A kind of Tensor that is to be considered a module parameter. Parameters are Tensor subclasses, that have a very special property when used with Module s - when they’re assigned as Module attributes they are automatically added to the list of its parameters, and will appear e.g. in parameters ...