1、
tf.random_normal(shape,mean = 0.0,stddev = 1.0,dtype = tf.Float32, seed = None, name = None)
mean是平均值
stddev是标准正态分布的标准差(方差的开平方)
2、tf.placeholder()
tf.placeholder操作是占位符,即先定义有这么一种数据,其参数为数据的type和space
tf.placeholder(tf.float32,shape=(bachsize,cols))#其中bachsize表示数据类型的行数,cols表示列数。
3、tf.reduce_mean(tensor t)
tf.reduce_mean()返回的是tensor t中各个元素的平均值。
如:
# 'x' is [[1., 1.]
# [2., 2.]]
tf.reduce_mean(x) ==>
1.5
tf.reduce_mean(x,
0
) ==> [
1.5 <