Digol
Digol

Reputation: 390

How to hide Tensorflow logging information on output window

I'm new to Python. Using Pycharm IDE I followed this tutorial. The complete code is here.

This code is iterative, running the code, for each iteration I get :

INFO:tensorflow:probabilities = [[0.00901909 0.20229901 0.04168228 0.03380775 0.04164521 0.07095326
  0.30759975 0.00563797 0.21675842 0.07059734]
 [0.00563906 0.03731773 0.0232646  0.09292353 0.01161542 0.06653289
  0.00265419 0.6255797  0.1038143  0.03065847]
 [0.00655828 0.00330277 0.00782441 0.00087765 0.4640763  0.02524412
  0.03457317 0.00737278 0.0192651  0.43090546]
                    .
                    .(a lot of this lines)
                    .
                    .
 [0.16861711 0.0002838  0.07394045 0.08323438 0.01832635 0.39693028
  0.1004111  0.01663646 0.07882028 0.06279974]
 [0.01767829 0.25284573 0.06204544 0.13148794 0.005388   0.03389382
  0.04371805 0.00890654 0.4342947  0.00974149]]
INFO:tensorflow:loss = 0.802033, step = 2273

I do not want to see INFO:tensorflow:probabilities displayed in "Run" window for each iteration.

To hide calculation\command output display in MATLAB, that I used until now, placing a ";" at the end of a line hide its outcome. I do not know how to get this in Pycharm. Already searched online.

Thanks.

Upvotes: 1

Views: 2715

Answers (1)

Morse
Morse

Reputation: 9134

Change the value at line #132

tensors_to_log = {"probabilities": "softmax_tensor"} or make it empty dictionary {}

or dont pass logging_hook parameter at line #146

or set tf.logging.level to only warnings at line #23

tf.logging.set_verbosity(tf.logging.WARN)

Credits : @bitsplit

More details about logging : Tensorflow API documentation

Upvotes: 3

Related Questions