caicloud / tensorflow-tutorial

Example TensorFlow codes and Caicloud TensorFlow as a Service dev environment.
2.93k stars 2.08k forks source link

第七章中的输入文件队列,运行match_filenames_once报错 #49

Closed liuchungui closed 7 years ago

liuchungui commented 7 years ago

错误信息:

tensorflow.python.framework.errors_impl.FailedPreconditionError: Attempting to use uninitialized value matching_filenames
     [[Node: _send_matching_filenames_0 = _Send[T=DT_STRING, client_terminated=true, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=7488469813197262420, tensor_name="matching_filenames:0", _device="/job:localhost/replica:0/task:0/cpu:0"](matching_filenames)]]

是否是与我环境有问题? 我电脑是Mac的,安装tensorFlow是用virtualenv方式

liuchungui commented 7 years ago

搞定了,需要先初始化

files = tf.train.match_filenames_once("data/data.tfrecords-*").initial_value