Changing the number of threads in TensorFlow on Cifar10

后端 未结 1 1093
孤街浪徒
孤街浪徒 2020-12-15 08:10

Whenever I run the cifar10_eval.py, in creates 32 threads as following:

I tensorflow/core/common_runtime/local_device.cc:25] Local device intra op parallelis

相关标签:
1条回答
  • 2020-12-15 08:42

    To configure this value, you can pass a tf.ConfigProto argument when constructing the tf.Session:

    NUM_THREADS = …
    sess = tf.Session(config=tf.ConfigProto(
        intra_op_parallelism_threads=NUM_THREADS))
    
    0 讨论(0)
提交回复
热议问题