TruncatedNormal#
- class brainstate.nn.init.TruncatedNormal(loc=0.0, scale=1.0, unit=Unit('1'), lower=None, upper=None, seed=None)#
Initialize weights with truncated normal distribution.
- Parameters:
loc (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Mean (“centre”) of the distribution before truncating. Note that the mean of the truncated distribution will not be exactly equal toloc.scale (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – The standard deviation of the normal distribution before truncating.lower (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) –- A float or array of floats representing the lower bound for
truncation. Must be broadcast-compatible with
upper.
upper (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – A float or array of floats representing the upper bound for truncation. Must be broadcast-compatible withlower.