在tensorflow中查看此代码段,该代码段应生成从0到1的统一数据
random_uniform(shape, minval, maxval, dtype, seed, name)
import TensorFlow as tf
import matplotlib.pyplot as plt
uniform = tf.random_uniform([100],minval=0,maxval=1,dtype=tf.float32)
sess = tf.Session()
with tf.Session() as session:
print uniform.eval()
plt.hist(uniform.eval(),normed=True)
plt.show()
它在图表上超出了1,对为什么感到好奇,或者它的上限是2?