CancelledError (см. Выше для отслеживания): очередь '_3_batch_1/fifo_queue' уже закрыта

Я использую (TF версия 0.12) модель TF-Slim Train/ Eval, обучение кода работает нормально (без ошибок), и только когда я запускаю файл оценки, он выдает следующую ошибку:

CancelledError (see above for traceback): Queue '_3_batch_1/fifo_queue' is already closed.
     [[Node: batch_1/fifo_queue_Close = QueueClose[_class=["loc:@batch_1/fifo_queue"], cancel_pending_enqueues=false, _device="/job:localhost/replica:0/task:0/cpu:0"](batch_1/fifo_queue)]]

и полная трассировка стека:

Caused by op u'batch_1/fifo_queue_Close', defined at:
  File "emotion_eval.py", line 126, in <module>
    tf.app.run()
  File "/igd/a1/home/ssingh/miniconda2/envs/menpo/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 43, in run
    sys.exit(main(sys.argv[:1] + flags_passthrough))
  File "emotion_eval.py", line 123, in main
    evaluate(FLAGS.dataset_dir)
  File "emotion_eval.py", line 45, in evaluate
    audio, ground_truth,_ = data_provider.get_split(data_folder, False, FLAGS.portion, FLAGS.batch_size, FLAGS.seq_length)
  File "/igd/a1/home/ssingh/GitClone/Multimodal-Emotion-Recognition/data_provider.py", line 100, in get_split
    [audio_samples, labels, subject_ids], batch_size, num_threads=1)
  File "/igd/a1/home/ssingh/miniconda2/envs/menpo/lib/python2.7/site-packages/tensorflow/python/training/input.py", line 684, in batch
    _enqueue(queue, tensor_list, num_threads, enqueue_many)
  File "/igd/a1/home/ssingh/miniconda2/envs/menpo/lib/python2.7/site-packages/tensorflow/python/training/input.py", line 587, in _enqueue
    queue_runner.add_queue_runner(queue_runner.QueueRunner(queue, enqueue_ops))
  File "/igd/a1/home/ssingh/miniconda2/envs/menpo/lib/python2.7/site-packages/tensorflow/python/training/queue_runner_impl.py", line 91, in __init__
    queue_closed_exception_types=queue_closed_exception_types)
  File "/igd/a1/home/ssingh/miniconda2/envs/menpo/lib/python2.7/site-packages/tensorflow/python/training/queue_runner_impl.py", line 137, in _init_from_args
    self._close_op = self._queue.close()
  File "/igd/a1/home/ssingh/miniconda2/envs/menpo/lib/python2.7/site-packages/tensorflow/python/ops/data_flow_ops.py", line 534, in close
    name=name)
  File "/igd/a1/home/ssingh/miniconda2/envs/menpo/lib/python2.7/site-packages/tensorflow/python/ops/gen_data_flow_ops.py", line 1024, in _queue_close
    name=name)
  File "/igd/a1/home/ssingh/miniconda2/envs/menpo/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 759, in apply_op
    op_def=op_def)
  File "/igd/a1/home/ssingh/miniconda2/envs/menpo/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2240, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/igd/a1/home/ssingh/miniconda2/envs/menpo/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1128, in __init__
    self._traceback = _extract_stack()

CancelledError (see above for traceback): Queue '_3_batch_1/fifo_queue' is already closed.
     [[Node: batch_1/fifo_queue_Close = QueueClose[_class=["loc:@batch_1/fifo_queue"], cancel_pending_enqueues=false, _device="/job:localhost/replica:0/task:0/cpu:0"](batch_1/fifo_queue)]]

и соответствующий код для чтения партиями, а затем eval:

audio_samples, метки, subject_ids = tf.train.batch( [audio_samples, метки, subject_ids], batch_size, num_threads=1, емкость =1000)

где batch_size=1

num_batches = int(FLAGS.num_examples / (FLAGS.batch_size * FLAGS.seq_length))

logging.set_verbosity(1)

slim.evaluation.evaluation_loop(
    '',
    FLAGS.checkpoint_dir,
    FLAGS.log_dir,
    num_evals=num_batches,
    eval_op=list(names_to_updates.values()),
    summary_op=tf.summary.merge(summary_ops),
    eval_interval_secs=FLAGS.eval_interval_secs)

В предыдущих исследованиях я обнаружил несколько постов, в которых говорилось о значимости batch_size для такого рода ошибок, хотя batch_size уже равен 1, и я попытал счастья с изменением num_threads, но ошибка сохраняется!

Есть идеи / предложения?

0 ответов

Другие вопросы по тегам