gpt4 book ai didi

tensorflow - 减少控制台冗长

转载 作者:行者123 更新时间:2023-12-05 00:10:50 25 4
gpt4 key购买 nike

我正在使用 Keras/TensorFlow 进行一些训练和预测,并且获得了一些我不需要的 OMP 信息。

2019-05-20 12:11:45.625897: I tensorflow/core/common_runtime/process_util.cc:71] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best p
erformance.
OMP: Info #250: KMP_AFFINITY: pid 22357 tid 22400 thread 1 bound to OS proc set 1
OMP: Info #250: KMP_AFFINITY: pid 22357 tid 22428 thread 2 bound to OS proc set 2
OMP: Info #250: KMP_AFFINITY: pid 22357 tid 22429 thread 3 bound to OS proc set 3
OMP: Info #250: KMP_AFFINITY: pid 22357 tid 22430 thread 4 bound to OS proc set 4
OMP: Info #250: KMP_AFFINITY: pid 22357 tid 22431 thread 5 bound to OS proc set 5
OMP: Info #250: KMP_AFFINITY: pid 22357 tid 22432 thread 6 bound to OS proc set 6
OMP: Info #250: KMP_AFFINITY: pid 22357 tid 22433 thread 7 bound to OS proc set 7
OMP: Info #250: KMP_AFFINITY: pid 22357 tid 22434 thread 8 bound to OS proc set 8
OMP: Info #250: KMP_AFFINITY: pid 22357 tid 22435 thread 9 bound to OS proc set 9
OMP: Info #250: KMP_AFFINITY: pid 22357 tid 22436 thread 10 bound to OS proc set 10
OMP: Info #250: KMP_AFFINITY: pid 22357 tid 22437 thread 11 bound to OS proc set 11
OMP: Info #250: KMP_AFFINITY: pid 22357 tid 22438 thread 12 bound to OS proc set 0


如何删除这种额外的冗长?

最佳答案

编辑:作为(比我更有资格谈论这个话题的人)Jim Cownie指出,此输出似乎是由于具有 KMP_AFFINITY用属性 verbose 定义.见 The KMP_AFFINITY Environment Variable并相应地设置环境变量(默认值为 noverbose,respect,granularity=core,none,0,0 )。

(以下信息可能有误)

如果您禁用 OpenMP 警告设置环境变量 KMP_WARNINGS,我认为这些消息应该会消失。至 off0 .从 shell :

$ KMP_WARNINGS=off python program.py

或者从 Python 本身,在 OpenMP 初始化之前:

import os
os.environ['KMP_WARNINGS'] = 'off'

关于tensorflow - 减少控制台冗长,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56224689/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com