I have this problem when I import tensorflow.contrib.slim
import tensorflow.contrib.slim as slim
i get this error message
Traceback (most recent call last):
File "/home/toshiba/PFE/DocFace-master/src/tflib.py", line 28, in <module>
import tensorflow.contrib.slim as slim
ModuleNotFoundError: No module named 'tensorflow.contrib'
tensorflow is correctly installed and i found some solutions that said that the file name is tensorflow so it causes the problem but that is not the case in here
TensorFlow's high-level machine learning API (tf. contrib. learn) makes it easy to configure, train, and evaluate a variety of machine learning models.
tf. contrib was removed in version 1.14 or 1.15.
You probably have TensorFlow version 2.* installed, but tf.contrib.slim
is TensorFlow 1.15 code. You can check here how to migrate your existing code to tensorflow 2.*.
If you instead want to keep your code, you can downgrade to TensorFlow by typing pip install tensorflow==1.15
into your command-line to downgrade to TensorFlow 1.15.
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