减少控制台冗长

编程入门 行业动态 更新时间:2024-10-26 10:29:29
本文介绍了减少控制台冗长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

I am running some training and prediction with Keras/TensorFlow and I get some OMP information that I do not need.

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

如何消除这种多余的言语?

How can I remove this extra verbosity?

推荐答案

As(比我更有资格谈论这个话题) Jim Cownie 指出,此输出似乎是由于用属性verbose定义了KMP_AFFINITY所致.参见 KMP_AFFINITY环境变量,并相应地设置环境变量(默认值为noverbose,respect,granularity=core,none,0,0).

As (the vastly more qualified to talk about this topic than me) Jim Cownie points out, this output appears to be due to having KMP_AFFINITY defined with the attribute verbose. See The KMP_AFFINITY Environment Variable and set the environment variable accordingly (the default value is noverbose,respect,granularity=core,none,0,0).

(以下可能是错误的信息)

(likely wrong information below)

我认为,如果禁用将环境变量KMP_WARNINGS设置为off或0的OpenMP警告,这些消息应该消失.从外壳:

I think those messages should go away if you disable the OpenMP warnings setting the environment variable KMP_WARNINGS to off or 0. From a shell:

$ KMP_WARNINGS=off python program.py

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

Or from Python itself, before OpenMP is initialized:

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

更多推荐

减少控制台冗长

本文发布于:2023-07-11 12:30:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1094068.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:控制台   冗长

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!