WARNING:tensorflow: is deprecated and will be removed in a future version的解决方案
1问题描述一瞬间出现超多的WARNINGWARNING:tensorflow:From e:\matlab\CNN-classification\LSTM\train_test.py:56: MultiRNNCell.__init__ (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a
1 问题描述
一瞬间出现超多的WARNING
WARNING:tensorflow:From e:\matlab\CNN-classification\LSTM\train_test.py:56: MultiRNNCell.__init__ (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replaced by that in Tensorflow 2.0.
WARNING:tensorflow:From e:\matlab\CNN-classification\LSTM\train_test.py:61: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.
Instructions for updating:
Please use `keras.layers.RNN(cell)`, which is equivalent to this API
WARNING:tensorflow:From D:\Program\Anaconda3\envs\cat\lib\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
WARNING:tensorflow:From D:\Program\Anaconda3\envs\cat\lib\site-packages\tensorflow\python\ops\rnn_cell_impl.py:738: calling Zeros.__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
2 解决方案
这种警告其实只与版本升级有关,不必理会,但是如果连看都不想看到的话,那就将
import tensorflow as tf
改为
import tensorflow as tf
tf.get_logger().setLevel('ERROR')
即可。
3 感谢
更多推荐
所有评论(0)