tensorflow l两种常见随机函数:tf.random_normal,tf.random_uniform

1:tf.random_normal:

正态分布产生的随机值:常用的参数就是shape,和dtype了,但是也包括方差和均值;

参数(shape,stddev,mean,dtype)

2:tf.random_uniform 

默然是在0到1之间产生随机数:

但是也可以通过maxval指定上界,通过minval指定下界


猜你喜欢

转载自blog.csdn.net/weixin_38859557/article/details/80878229