disable warnings

1,755 views
Skip to first unread message

Eliza

unread,
Aug 26, 2019, 5:15:49 AM8/26/19
to dis...@tensorflow.org
Hello,

I am newbie to tensorflow.
When running the demo code from tensorflow.org, I got a lot of warnings:

$ python tensor3.py
WARNING: Logging before flag parsing goes to stderr.
W0826 17:10:02.049153 139835382650688 deprecation.py:506] From
/home/pyh/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251:
calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops)
with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it
to the constructor
W0826 17:10:02.053299 139835382650688 deprecation_wrapper.py:119] From
tensor3.py:18: The name tf.train.RMSPropOptimizer is deprecated. Please
use tf.compat.v1.train.RMSPropOptimizer instead.

W0826 17:10:02.070683 139835382650688 training_utils.py:1300] Expected a
shuffled dataset but input dataset `x` is not shuffled. Please invoke
`shuffle()` on input dataset.
2019-08-26 17:10:02.076553: I
tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports
instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-08-26 17:10:02.081878: I
tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency:
2399995000 Hz
2019-08-26 17:10:02.082394: I
tensorflow/compiler/xla/service/service.cc:168] XLA service
0x5640ef2706b0 executing computations on platform Host. Devices:
2019-08-26 17:10:02.082506: I
tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device
(0): <undefined>, <undefined>
2019-08-26 17:10:02.090634: W
tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time
warning): Not using XLA:CPU for cluster because envvar
TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set. If you want XLA:CPU,
either set that envvar, or use experimental_jit_scope to enable XLA:CPU.
To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1
(as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar
XLA_FLAGS=--xla_hlo_profile.
W0826 17:10:02.422928 139835382650688 deprecation.py:506] From
/home/pyh/anaconda3/lib/python3.7/site-packages/tensorflow/python/training/rmsprop.py:119:
calling Ones.__init__ (from tensorflow.python.ops.init_ops) with dtype
is deprecated and will be removed in a future version.

Do you know how to disable warnings in the program?
Currently I am doing with:

$ python tensor3.py 2>/dev/null

This is may not the good way.
My env info:

$ python -c 'import tensorflow as tf;print(tf.__version__)'
1.14.0

$ python -V
Python 3.7.3

Thank you.

sx f

unread,
Aug 26, 2019, 5:36:09 AM8/26/19
to Discuss, e...@chinabuckets.com
  • tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)

在 2019年8月26日星期一 UTC+8下午5:15:49,Eliza写道:
Reply all
Reply to author
Forward
0 new messages