报错 initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed

WARNING:tensorflow:From /home/hndx532/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_should_use.py:118: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.

解决:

#将init = tf.initialize_all_variables() # old api 改为
init = tf.global_variables_initializer() #new api


 

猜你喜欢

转载自blog.csdn.net/qq_33373858/article/details/82771740