Module — PyTorch 1.10.1 documentation
pytorch.org › docs › stableregister_buffer (name, tensor, persistent = True) [source] ¶ Adds a buffer to the module. This is typically used to register a buffer that should not to be considered a model parameter. For example, BatchNorm’s running_mean is not a parameter, but is part of the module’s state. Buffers, by default, are persistent and will be saved ...