gpt4 book ai didi

python - 如何使用 Keras 摆脱 tensorflow 详细消息

转载 作者:太空狗 更新时间:2023-10-29 20:29:05 24 4
gpt4 key购买 nike

我正在试用 tensorflow Keras 后端。它不断将这些过于冗长的消息打印到终端,这会破坏 probar 记录器的输出。比如下面的。

h 1/200
4608/3629568 [..............................] - ETA: 849s - loss: 1.1816I tensorflow/core/common_runtime/gpu/pool_allocator.cc:244] PoolAllocator: After 4208 get requests, put_count=4193 evicted_count=1000 eviction_rate=0.238493 and unsatisfied allocation rate=0.264971
I tensorflow/core/common_runtime/gpu/pool_allocator.cc:256] Raising pool_size_limit_ from 100 to 110

如何让tensorflow相当?我一直在查看文档,但找不到任何类似 .theanorc 文件的设置。

最佳答案

如果您使用的是 TensorFlow 0.12,您可以设置 TF_CPP_MIN_LOG_LEVEL 环境变量来过滤掉日志消息。例如,您可以通过这种方式启动 python 以避免 INFO 级别的消息(例如任务中的“Raising pool_size_limit_”消息):

$ TF_CPP_MIN_LOG_LEVEL=1 python ...

关于python - 如何使用 Keras 摆脱 tensorflow 详细消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37679267/

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