Skip to content

Commit

Permalink
添加tf.local_variables_initializer()
Browse files Browse the repository at this point in the history
tf.train.match_filenames_once()函数内部创建一个存储匹配的文件名的“局部变量”,但是这个局部变量必须被初始化。
  • Loading branch information
codercuixin authored Jul 12, 2017
1 parent fea49c4 commit d38a76d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
" 'j': tf.FixedLenFeature([], tf.int64),\n",
" })\n",
"with tf.Session() as sess:\n",
" tf.global_variables_initializer().run()\n",
" sess.run([tf.global_variables_initializer(), tf.local_variables_initializer()])\n",
" print sess.run(files)\n",
" coord = tf.train.Coordinator()\n",
" threads = tf.train.start_queue_runners(sess=sess, coord=coord)\n",
Expand Down

0 comments on commit d38a76d

Please sign in to comment.