v0. 12+ Update (05/20/17), Work through TF 2.0 alpha:
In TensorFlow 0. 12+, for this problem , now you can control the registration through an environment variable called TF_CPP_MIN_LOG_LEVEL ; by default it is 0 (all logs are shown), but one of the following values ββin the Level column can be set.
Level | Level for Humans | Level Description -------|------------------|------------------------------------ 0 | DEBUG | [Default] Print all messages 1 | INFO | Filter out INFO messages 2 | WARNING | Filter out INFO & WARNING messages 3 | ERROR | Filter out all messages
See the following general OS example using Python:
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
To be precise, you can also set the level for the Python tf_logging module, which is used, for example, in. summary operations, tensor board, various ratings, etc.
For previous versions of TensorFlow or TF-Learn Logging (v0.11.x or lower):See the page below for information on logging TensorFlow; with the new update, you can set the logging details to DEBUG , INFO , WARN , ERROR or FATAL . For example:
tf.logging.set_verbosity(tf.logging.ERROR)
The page also displays monitors that can be used with TF-Learn models. Here is the page .
This does not block all logs (TF-Learn only). I have two solutions; one is a technically correct solution (Linux), and the other is a rebuild of TensorFlow.
script -c 'python [FILENAME].py' | grep -v 'I tensorflow/'
For reading, see this answer , which includes changing the source code and rebuilding TensorFlow.