Ramraj Chandradevan
Ramraj Chandradevan

Reputation: 173

How to hide tensorflow session logs from terminal, for a clean verbosity

When I run the tensorflow script, I should be able to observe only the expected verbosity in the terminal. Not the tensorflow Session start messages.

Upvotes: 0

Views: 404

Answers (1)

Arnav
Arnav

Reputation: 286

Try using:

import os
import tensorflow as tf
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'  # or any {'0', '1', '2'}

Or

tf.logging.set_verbosity(tf.logging.ERROR)

Upvotes: 1

Related Questions