# Tensorflow系列：tf.random_normal

tf.random_normal
tf.random_normal(shape, mean=0.0, stddev=1.0, dtype=tf.float32, seed=None, name=None)

Outputs random values from a normal distribution.

Args:

shape: A 1-D integer Tensor or Python array. The shape of the output tensor.用一个list表示产出的Tensor的形状
mean: A 0-D Tensor or Python value of type dtype. The mean of the normal distribution.均值
stddev: A 0-D Tensor or Python value of type dtype. The standard deviation of the normal distribution.标准差
dtype: The type of the output.数据类型
seed: A Python integer. Used to create a random seed for the distribution. See set_random_seed for behavior.
name: A name for the operation (optional).
Returns:

A tensor of the specified shape filled with random normal values.

norm = tf.random_normal([2, 3], seed=1234)
sess = tf.Session()
print(sess.run(norm))
print(sess.run(norm))

[[ 0.51340485 -0.25581399 0.65199131]
[ 1.39236379 0.37256798 0.20336303]]
[[ 0.96462417 0.34291974 0.24251089]
[ 1.05785966 1.65749764 0.82108968]]

#### tensorflow中tf.random_normal和tf.truncated_normal的区别

2017-06-24 15:31:01

#### tensorflow 生成随机数 tf.random_normal 和 tf.random_uniform 和 tf.truncated_normal 和 tf.random_shuffle

2017-07-23 22:18:34

#### tf.random_normal([2,2])

2018-03-26 21:57:36

#### TensorFlow学习笔记（5）----TF生成数据的方法

2016-09-05 19:03:01

#### TensorFlow学习笔记（十六）tf.random_normal

2017-08-17 12:57:53

#### TensorFlow学习笔记:tf.random_normal

2018-01-25 09:30:03

#### tf.truncated_normal与tf.random_normal

2017-03-23 17:30:52

#### Tensorflow函数：tf.random_normal

2018-03-30 10:38:06

#### tf.random_normal

2017-08-19 10:30:33