Help on class RandomNormal in module tensorflow.python.ops.init_ops:
函数原型:tf.random_normal_initializer(mean=0.0, stddev=1.0, seed=None, dtype=tf.float32)
返回一个生成具有正态分布的张量的初始化器。
参数:
-
mean:python标量或标量tensor,产生的随机值的平均值。
-
stddev:一个python标量或一个标量tensor,标准偏差的随机值生成。
-
seed:一个Python整数。 用于创建随机seed有关行为,请参阅官网API:set_random_seed。
-
dtype:数据类型, 只支持浮点类型。
函数返回:产生具有正态分布的张量的初始化器。
class RandomNormal(Initializer)
| Initializer that generates tensors with a normal distribution.
|
| Args:
| mean: a python scalar or a scalar tensor. Mean of the random values
| to generate.
| stddev: a python scalar or a scalar tensor. Standard deviation of the
| random values to generate.
| seed: A Python integer. Used to create random seeds. See
| @{tf.set_random_seed}
| for behavior.
| dtype: The data type. Only floating point types are supported.
|
| Method resolution order:
| RandomNormal
| Initializer
| builtins.object
|
| Methods defined here:
|
| __call__(self, shape, dtype=None, partition_info=None)
| Call self as a function.
|
| __init__(self, mean=0.0, stddev=1.0, seed=None, dtype=tf.float32)
| Initialize self. See help(type(self)) for accurate signature.
|
| get_config(self)
| Returns the configuration of the initializer as a JSON-serializable dict.
|
| Returns:
| A JSON-serializable Python dict.
|
| ----------------------------------------------------------------------
| Class methods inherited from Initializer:
|
| from_config(config) from builtins.type
| Instantiates an initializer from a configuration dictionary.
|
| Example:
|
| ```python
| initializer = RandomUniform(-1, 1)
| config = initializer.get_config()
| initializer = RandomUniform.from_config(config)
| ```
|
| Args:
| config: A Python dictionary.
| It will typically be the output of `get_config`.
|
| Returns:
| An Initializer instance.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from Initializer:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)