1. 程式人生 > >[TensorFlow] demo1 tf.initialize_all_variables函式換成新的tf.global_variables_initializer函式

[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.

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