I have seen many usage of that line of code in many tensorflow projects. What does the line do in tensorflow?
The logging level documentation page basically tells you:
If you set it to the level as displayed (INFO
), then TensorFlow will tell you all messages that have the label INFO
(or more critical).
Say you would only be interested in WARN
or ERROR
, then you could similarly set tf.logging.set_verbosity(tf.logging.WARN)
It is easier to try this yourself. I use Pycharm IDE and it captures the output.
import tensorflow as tf
tf.logging.set_verbosity(tf.logging.DEBUG)
#tf.logging.set_verbosity(tf.logging.INFO)
# Other settings
tf.logging.debug('Debug')
tf.logging.info('info')
tf.logging.warn('warn')
tf.logging.error('error')
tf.logging.fatal('fatal')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With