tensorflow 디버깅

1712 단어 Tensorflow
코드의 어느 곳에서든 인쇄 Samples 변수를 디버깅하려면 다음과 같이 하십시오.
inputs_queue = prefetch_queue.prefetch_queue( variable_name, capacity=128 * config.num_clones)
with tf.Session() as sess:
    init = tf.global_variables_initializer()
    sess.run(init)

    coord = tf.train.Coordinator()
    threads = tf.train.start_queue_runners(coord = coord)
    variable_name = inputs_queue.dequeue()
    print sess.run(variable_name)
    coord.request_stop()
    coord.join(threads)

또는 다음 쓰기:
with tf.Session() as sess:
    init = tf.global_variables_initializer()
    sess.run(init)

    coord = tf.train.Coordinator()
    threads = tf.train.start_queue_runners(coord = coord)
    print sess.run(variable_name)
    coord.request_stop()
    coord.join(threads)

좋은 웹페이지 즐겨찾기