TruncatedNormalInitializer

class paddle.fluid.initializer.TruncatedNormalInitializer(loc=0.0, scale=1.0, seed=0)[source]

Implements the Random TruncatedNormal(Gaussian) distribution initializer

Parameters
  • loc (float) – mean of the normal distribution

  • scale (float) – standard deviation of the normal distribution

  • seed (int) – random seed

Examples

import paddle.fluid as fluid
x = fluid.data(name='x', shape=[None, 1], dtype='float32')
fc = fluid.layers.fc(input=x, size=10,
    param_attr=fluid.initializer.TruncatedNormal(loc=0.0, scale=2.0))