Keras: Tensorflow new version lots of deprecations

Created on 24 Jun 2019  路  18Comments  路  Source: keras-team/keras

WARNING: Logging before flag parsing goes to stderr.
W0624 15:31:08.865480 14340 deprecation_wrapper.py:119] From c:\users\user\tempenvs\maskrcnn6\lib\site-packages\keras\backend\tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

W0624 15:31:08.883394 14340 deprecation_wrapper.py:119] From c:\users\user\tempenvs\maskrcnn6\lib\site-packages\keras\backend\tensorflow_backend.py:74: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.

W0624 15:31:08.887409 14340 deprecation_wrapper.py:119] From c:\users\user\tempenvs\maskrcnn6\lib\site-packages\keras\backend\tensorflow_backend.py:4138: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.

W0624 15:31:08.906373 14340 deprecation_wrapper.py:119] From c:\users\user\tempenvs\maskrcnn6\lib\site-packages\keras\backend\tensorflow_backend.py:1919: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.

W0624 15:31:08.909325 14340 deprecation_wrapper.py:119] From c:\users\user\tempenvs\maskrcnn6\lib\site-packages\keras\backend\tensorflow_backend.py:3976: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.

W0624 15:31:10.804918 14340 deprecation_wrapper.py:119] From c:\users\user\tempenvs\maskrcnn6\lib\site-packages\keras\backend\tensorflow_backend.py:2018: The name tf.image.resize_nearest_neighbor is deprecated. Please use tf.compat.v1.image.resize_nearest_neighbor instead.

W0624 15:31:11.136994 14340 deprecation_wrapper.py:119] From C:\Users\user\Mask1\Mask_RCNN\mrcnn\model.py:341: The name tf.log is deprecated. Please use tf.math.log instead.

W0624 15:31:11.143975 14340 deprecation.py:323] From C:\Users\user\Mask1\Mask_RCNN\mrcnn\model.py:399: add_dispatch_support..wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
W0624 15:31:11.148962 14340 deprecation.py:506] From C:\Users\user\Mask1\Mask_RCNN\mrcnn\model.py:423: calling crop_and_resize_v1 (from tensorflow.python.ops.image_ops_impl) with box_ind is deprecated and will be removed in a future version.
Instructions for updating:
box_ind is deprecated, use box_indices instead
W0624 15:31:11.327487 14340 deprecation_wrapper.py:119] From C:\Users\user\Mask1\Mask_RCNN\mrcnn\model.py:720: The name tf.sets.set_intersection is deprecated. Please use tf.sets.intersection instead.

W0624 15:31:11.335498 14340 deprecation_wrapper.py:119] From C:\Users\user\Mask1\Mask_RCNN\mrcnn\model.py:722: The name tf.sparse_tensor_to_dense is deprecated. Please use tf.sparse.to_dense instead.

W0624 15:31:11.481072 14340 deprecation.py:323] From C:\Users\user\Mask1\Mask_RCNN\mrcnn\model.py:772: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.

tensorflow awaiting response support

Most helpful comment

They are not errors, they are just warnings. You can either ignore them, or help updating keras source code to avoid using deprecated tensorflow code.

All 18 comments

How can I get rid of this kind of error? What is the reason behind it?

They are not errors, they are just warnings. You can either ignore them, or help updating keras source code to avoid using deprecated tensorflow code.

I've removed some old deprecated calls. Please do check. #13012

Guys I solved the problem. I was using Tensorflow 1.14.0. I just installed Tensorflow 1.5.0 and I am not getting these errors now. Thank you!

@mertakcin If you are developing BIG models, i would suggest you to use recent tensorflow versions TF1.14.0 or TF2.0 as they are much better in performance when compared to old TF versions.

You could disable warnings in Keras. Check this resource for a solution. There are several other resources for the same purpose. thanks!

Automatically closing this out since I understand it to be resolved, but please let me know if I'm mistaken.Thanks!

Guys I solved the problem. I was using Tensorflow 1.14.0. I just installed Tensorflow 1.5.0 and I am not getting these errors now. Thank you!

How can you install Tensorflow 1.5.0 in anaconda prompt ? I'm just blocked by same problem as you're.

I too had the same problem and upgrading to Tensorflow 1.5 resolved the problem, Thanks for recording it so all of us are benefiting

Guys I solved the problem. I was using Tensorflow 1.14.0. I just installed Tensorflow 1.5.0 and I am not getting these errors now. Thank you!

How did you upgrade to Tensorflow 1.5 from Tensorflow 1.14.0 ?

Thanks

If you use Ubuntu just try "pip install tensorflow-gpu==1.5.0". However, if you use windows, you just need to make a quick research about how to install tensorflow 1.5.0 on windows cmd.

Guys I solved the problem. I was using Tensorflow 1.14.0. I just installed Tensorflow 1.5.0 and I am not getting these errors now. Thank you!

How did you upgrade to Tensorflow 1.5 from Tensorflow 1.14.0 ?

Thanks

Isn't it a downgrade from TF 1.14 to 1.5 ?

Guys I solved the problem. I was using Tensorflow 1.14.0. I just installed Tensorflow 1.5.0 and I am not getting these errors now. Thank you!

How did you upgrade to Tensorflow 1.5 from Tensorflow 1.14.0 ?
Thanks

Isn't it a downgrade from TF 1.14 to 1.5 ?

Yeah, actually It is :D I just wanted to say that installing TF 1.5.0 version would fix the problem.

I am currently using TF 1.14.0 stable version and I am still facing this issue.

pip3 install --upgrade tensorflow

The below link solved my issue.

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

Faced this issue on Mac. I wasn't able to update to 1.5.0 from 1.14.0 until Mac OS is upgraded.

Guys I solved the problem. I was using Tensorflow 1.14.0. I just installed Tensorflow 1.5.0 and I am not getting these errors now. Thank you!

How did you upgrade to Tensorflow 1.5 from Tensorflow 1.14.0 ?

Thanks

TF 1.5 is an older version

I'm using tf-nightly-gpu, and getting three deprecated warning:

W0109 13:23:44.764012 139658194708288 deprecation_wrapper.py:119] From /usr/local/lib/python3.6/dist-packages/Keras-2.2.4-py3.6.egg/keras/backend/tensorflow_backend.py:74: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.

W0109 13:23:44.777156 139658194708288 deprecation_wrapper.py:119] From /usr/local/lib/python3.6/dist-packages/Keras-2.2.4-py3.6.egg/keras/backend/tensorflow_backend.py:529: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

W0109 13:23:44.778296 139658194708288 deprecation_wrapper.py:119] From /usr/local/lib/python3.6/dist-packages/Keras-2.2.4-py3.6.egg/keras/backend/tensorflow_backend.py:4420: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.

My TF version is 2.0,but I still faced the issue.I found that if training small data, there are no warnings..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

farizrahman4u picture farizrahman4u  路  3Comments

vinayakumarr picture vinayakumarr  路  3Comments

KeironO picture KeironO  路  3Comments

amityaffliction picture amityaffliction  路  3Comments

braingineer picture braingineer  路  3Comments