unilab.algos.torch.common.normalization¶
Observation normalization for RL training.
Classes
Normalize mean and variance of observations using running statistics. |
- class unilab.algos.torch.common.normalization.EmpiricalNormalization[source]¶
Bases:
ModuleNormalize mean and variance of observations using running statistics.
- count: torch.Tensor¶
- __init__(shape, device, eps=0.01)[source]¶
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- property mean¶
- property std¶
- forward(x, center=True, update=True)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.