Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorflow 1.14.0 API Deprecation Warnings #40

Closed
MajorError opened this issue Jul 3, 2019 · 10 comments
Closed

Tensorflow 1.14.0 API Deprecation Warnings #40

MajorError opened this issue Jul 3, 2019 · 10 comments

Comments

@MajorError
Copy link

Tensorflow is deprecating the v1 API, and moving it into tf.compat.v1. In addition, some elements of the API are being replaced by new API.

Example output:

W0703 09:23:51.102508 140059022907200 deprecation.py:323] From site-packages/tensorflow/python/training/queue_runner_impl.py:391: QueueRunner.__init__ (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
Instructions for updating:
To construct input pipelines, use the `tf.data` module.
W0703 09:23:51.141032 140059022907200 deprecation.py:323] From site-packages/tensorflow/python/training/saver.py:1276: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
2019-07-03 09:23:52.959783: 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.
W0703 09:23:53.422218 140059022907200 deprecation_wrapper.py:119] From site-packages/mtcnn/mtcnn.py:187: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

W0703 09:23:53.422743 140059022907200 deprecation_wrapper.py:119] From site-packages/mtcnn/mtcnn.py:193: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

W0703 09:23:53.433550 140059022907200 deprecation_wrapper.py:119] From site-packages/mtcnn/network.py:43: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.

W0703 09:23:53.434048 140059022907200 deprecation_wrapper.py:119] From site-packages/mtcnn/layer_factory.py:88: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

W0703 09:23:53.435072 140059022907200 deprecation_wrapper.py:119] From site-packages/mtcnn/layer_factory.py:79: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.

W0703 09:23:53.435565 140059022907200 deprecation.py:506] From 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
W0703 09:23:53.454373 140059022907200 deprecation_wrapper.py:119] From site-packages/mtcnn/layer_factory.py:171: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.

W0703 09:23:53.505696 140059022907200 deprecation.py:323] From site-packages/mtcnn/layer_factory.py:221: div (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Deprecated in favor of operator or tf.math.divide.
W0703 09:23:53.700929 140059022907200 deprecation_wrapper.py:119] From site-packages/mtcnn/layer_factory.py:196: The name tf.nn.xw_plus_b is deprecated. Please use tf.compat.v1.nn.xw_plus_b instead.

This issue is distinct from #3, which refers to the keep_dims deprecation.

I understand that I can filter warnings to suppress them, but sometimes they contain useful notifications that are relevant elsewhere in my codebase, so I'd prefer not to if I can help it!

Is there a roadmap to migrate to non-deprecated Tensorflow APIs?

@superSupa
Copy link

I am facing with this too
Please guide me if you found the solution
Thank you~

@jack-kavanagh
Copy link

Also having this problem

@noiji
Copy link

noiji commented Jul 10, 2019

You can see the solution here. Upgrading code is noted. https://www.tensorflow.org/beta/guide/upgrade

@tangjie77wd
Copy link

@jack-kavanagh Have you upgraded Tensorflow to version 2.0 ?Have already solved the problem?

@jack-kavanagh
Copy link

@tangjie77wd yes I fixed the issue by upgrading to TF 2.0

@tangjie77wd
Copy link

@jack-kavanagh My Tensorflow version is 1.13 and i use pip --upgrade tensorflow but get nothing.How do you upgrade Tensorflow ? I really do not want build Tensorflow totally again because the process is painful for me so i just want to upgrade it.

@jack-kavanagh
Copy link

jack-kavanagh commented Jul 17, 2019

@tangjie77wd I tried to use pip --upgrade tensorflow, but this didn't help. I ended up using pip install tensorflow==2.0.0-beta1 (tensorflow-gpu==2.0.0-beta1) for the gpu version.

@tangjie77wd
Copy link

tangjie77wd commented Jul 18, 2019

@jack-kavanagh Thank you very much ! I have test "pip install tensorflow==2.0.0-beta1" for my cpu version successfully because it outputs 2.0.0-beta1 when i inputs print(tf.version). However,the warning is still the same when i run my tensorflow c++ project .By the way ,i have not changed anything of my tensorflow c++ project because i do not know what should be replaced . Do i need change something like the project properties or active something since i have upgrade tensorflow from 1.13.1 to 2.0.0 ?

@ganesh-ms
Copy link

The below link solved my issue.

https://stackoverflow.com/a/56820328/6825288

@cnopens
Copy link

cnopens commented Aug 19, 2021

only adjust "import compat.v1.tensorflow as tf"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants