书本3.1.2计算图的使用中的第41页,实例中
v = tf.get_variable(
'v', initializer = tf.zeros_initializer(shape = [1]))
报错
原因在于新版的tensorflow将语法改为
v = tf.get_variable(
'v', shape = [1], initializer = tf.zeros_initializer)
tf.initialize_all_variables().run()
的语法也改为
tf.global_variables_initializer().run()
转载来源 https://blog.csdn.net/linshu1183/article/details/78901676