NormalInitializer_cn.rst 657 字节
Newer Older
H
Hao Wang 已提交
1 2 3 4 5 6 7
.. _cn_api_fluid_initializer_NormalInitializer:

NormalInitializer
-------------------------------

.. py:class:: paddle.fluid.initializer.NormalInitializer(loc=0.0, scale=1.0, seed=0)

8
随机正态(高斯)分布初始化函数
H
Hao Wang 已提交
9 10

参数:
11 12 13
    - **loc** (float) - 正态分布的平均值
    - **scale** (float) - 正态分布的标准差
    - **seed** (int) - 随机种子
H
Hao Wang 已提交
14 15 16 17 18

**代码示例**

.. code-block:: python

19 20 21 22
    import paddle.fluid as fluid
    x = fluid.layers.data(name="data", shape=[32, 32], dtype="float32")
    fc = fluid.layers.fc(input=x, size=10,
        param_attr=fluid.initializer.Normal(loc=0.0, scale=2.0))
H
Hao Wang 已提交
23 24