I am using TensorFlow version=2.0.0 python version=3.7.3 I am trying to import the below statement
from tensorflow.contrib import rnn
And it gives error as Module 'tensorflow' has no attribute 'contrib' How can I resolve this?
from tensor flow
https://www.tensorflow.org/guide/upgrade#compatibility_modules
Because of TensorFlow 2.x module deprecations (for example, tf.flags and tf.contrib), some changes can not be worked around by switching to compat.v1. Upgrading this code may require using an additional library (for example, absl.flags) or switching to a package in tensorflow/addons.
and as describe in this thread
tensorflow.contrib doesn't exist in 2.0.
https://github.com/tensorflow/tensorflow/issues/31350#issuecomment-518749548
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With