[TensorFlow] demo1 tf.initialize_all_variables函数换成新的tf.global_variables_initializer函数

WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/python/util/tf_should_use.py:107: 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.

[TensorFlow] demo1 tf.initialize_all_variables函数换成新的tf.global_variables_initializer函数_第1张图片


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

[TensorFlow] demo1 tf.initialize_all_variables函数换成新的tf.global_variables_initializer函数_第2张图片

你可能感兴趣的:(Python,TensorFlow)