TruncatedNormalNoise
TruncatedNormalNoise(
mu: Union[float, th.Tensor] = 0.0, sigma: Union[float, th.Tensor] = 1.0,
low: float = -1.0, high: float = 1.0, eps: float = 1e-06,
stddev_schedule: str = 'linear(1.0, 0.1, 100000)'
)
Truncated normal action noise. See Section 3.1 of "Mastering Visual Continuous Control: Improved Data-Augmented Reinforcement Learning".
Args
- mu (Union[float, th.Tensor]) : Mean of the noise.
- sigma (Union[float, th.Tensor]) : Standard deviation of the noise.
- low (float) : The lower bound of the noise.
- high (float) : The upper bound of the noise.
- eps (float) : A small value to avoid numerical instability.
- stddev_schedule (str) : Use the exploration std schedule, available options are:
linear(init, final, duration)
andstep_linear(init, final1, duration1, final2, duration2)
.
Returns
Truncated normal noise instance.
Methods:
.sample
Generates a sample_shape shaped sample or sample_shape shaped batch of samples if the distribution parameters are batched.
Args
- clip (Optional[float]) : The clip range of the sampled noises.
- sample_shape (th.Size) : The size of the sample to be drawn.
Returns
A sample_shape shaped sample.
.mean
Returns the mean of the distribution.
.mode
Returns the mode of the distribution.