Tensorflow Enqueue operation was cancelled

前端 未结 3 1607
甜味超标
甜味超标 2021-02-04 10:41

I had built a convolutional neural network in tensorflow. It is trained and now I am unpacking it and performing evaluations.

import main
import Process
import I         


        
3条回答
  •  抹茶落季
    2021-02-04 11:08

    a way to add coord with exception handling:

    coord = tf.train.Coordinator()
    threads = tf.train.start_queue_runners(sess, coord)
    
    try:
        while not coord.should_stop():
    
            #doing things here
    
    except tf.errors.OutOfRangeError:
        print("things done")
    
    finally:
        coord.request_stop()
    

    then bug fixed :-)

提交回复
热议问题