Rate this Page

reset_noise#

class torchrl.modules.reset_noise(layer: Module)[source]#

Resets the noise of noisy layers.

Designed to be passed to apply():

module.apply(reset_noise)

NoisyLinear samples its factorized noise only here and at construction. The forward pass does not resample.

Parameters:

layer (nn.Module) – a module. If it implements reset_noise, that method is called; otherwise this is a no-op.