tf.Variable(initializer, name):initializer是初始化参数,可以有tf.random_normal,tf.constant,tf.constant等,name就是变量的名字,用法如下:
输出:
[[ 0.76599932 0.99722123 -0.89361787]
[ 0.19991693 -0.16539733 2.16605783]]
1
[[ 1. 1. 1.]
[ 1. 1. 1.]]
tf.Variable(initializer, name):initializer是初始化参数,可以有tf.random_normal,tf.constant,tf.constant等,name就是变量的名字,用法如下:
输出:
[[ 0.76599932 0.99722123 -0.89361787]
[ 0.19991693 -0.16539733 2.16605783]]
1
[[ 1. 1. 1.]
[ 1. 1. 1.]]