2017-02-08 67 views

回答

2

隨着tf.truncated_normal您可以從截斷隨機分佈得到隨機值,即:

shape = [10,10] # variable shape 
weight = tf.Variable(tf.truncated_normal(shape, mean=0.0, stddev=0.01)) 
bias = tf.Variable(0.) 
+1

最後我用'初始化= tf.truncated_normal_initializer(平均= 0.0,STDDEV = 0.01)'。謝謝你的幫助 – mcExchange

相關問題