ConstantInitializer

class paddle.fluid.initializer.ConstantInitializer(value=0.0, force_cpu=False)[source]

Implements the constant initializer

Parameters

value (float32) – constant value to initialize the variable

Examples

import paddle.fluid as fluid
x = fluid.data(name="data", shape=[8, 32, 32], dtype="float32")
fc = fluid.layers.fc(input=x, size=10,
    param_attr=fluid.initializer.Constant(value=2.0))