浏览代码

Update deprecated function

Update based on the error message:
 WARNING:tensorflow:From ./neural_programmer/parameters.py:75 in parameters.: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Henry-E 8 年之前
父节点
当前提交
16188ae283
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      neural_programmer/parameters.py

+ 1 - 1
neural_programmer/parameters.py

@@ -72,7 +72,7 @@ class Parameters:
         self.RandomUniformInit([1, embedding_dims]))
     params["break_conditional"] = tf.Variable(
         self.RandomUniformInit([2 * embedding_dims, embedding_dims]))
-    init = tf.initialize_all_variables()
+    init = tf.global_variables_initializer()
     return params, global_step, init
 
   def RandomUniformInit(self, shape):