运行tensorflow时如何抑制消息?

时间:2019-03-10 13:19:06

标签: python tensorflow

从tensorflow 1.12开始,我收到一条类似这样的消息:

2019-03-10 13:58:26.356736: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1674] Adding visible gpu devices: 0, 1
2019-03-10 13:58:26.356811: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1082] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-03-10 13:58:26.356820: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1088]      0 1 
2019-03-10 13:58:26.356826: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1101] 0:   N N 
2019-03-10 13:58:26.356830: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1101] 1:   N N 
2019-03-10 13:58:26.357241: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1222] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10247 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080 Ti, pci bus id: 0000:08:00.0, compute capability: 7.5)
2019-03-10 13:58:26.357445: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1222] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:1 with 10239 MB memory) -> physical GPU (device: 1, name: GeForce GTX 1080 Ti, pci bus id: 0000:42:00.0, compute capability: 6.1)

我读到某处(a不记得在哪里),构建自己的张量流将阻止收到此消息。在1.13版中,我得到了大约20条消息。我编译并安装了自己的张量流,但这没有帮助。

有人知道我如何摆脱这些烦人的消息吗?使用ubuntu 18.04,anaconda和python 3.6,keras 2.2.4,Cuda 10,cudnn 7。

0 个答案:

没有答案