Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get rid of tensorflow verbose messages with Keras

I am trying out the tensorflow Keras backend. It keeps printing these overly verbose messages to the terminal which kind of ruins the the output of the probar logger. Such as the following.

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

How can I make tensorflow quite? I have been looking through the documentation and I can't find anything like a .theanorc file for settings.

like image 770
chasep255 Avatar asked Jun 07 '16 12:06

chasep255


1 Answers

If you are using TensorFlow 0.12, you can set the TF_CPP_MIN_LOG_LEVEL environment variable to filter out log messages. For example, you can start python this way to avoid the INFO-level messages (such as the "Raising pool_size_limit_" message in your quest):

$ TF_CPP_MIN_LOG_LEVEL=1 python ...
like image 137
mrry Avatar answered Oct 21 '22 20:10

mrry