Disable Tensorflow logging

I'm always getting logging like this. 

I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:900] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties: 
name: Graphics Device
major: 5 minor: 2 memoryClockRate (GHz) 1.0885
pciBusID 0000:04:00.0
Total memory: 12.00GiB
Free memory: 11.83GiB
...

How can I disable it?

tensorflowtensorflow-logs
2 votesLP190.00
1 Answers
JW234.00
2

You just need to change the environment variable and put a logging level for tensorflow.

import os

os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'  # 0, 1, 2, 3

Also you can check which level you want for logging and useing them in stead of disabling.

Reply
Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?