google-research/tf-slim

No module named 'tensorflow.contrib'

FalsoMoralista opened this issue ยท 9 comments

Python 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import tensorflow as tf
pr2020-01-29 15:18:13.935115: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libnvinfer.so.6
2020-01-29 15:18:13.936492: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libnvinfer_plugin.so.6
print(tf.version)
2.1.0
import tf_slim as slim
Traceback (most recent call last):
File "", line 1, in
File "/home/luciano/.local/lib/python3.6/site-packages/tf_slim/init.py", line 23, in
from tf_slim import evaluation
File "/home/luciano/.local/lib/python3.6/site-packages/tf_slim/evaluation.py", line 131, in
from tensorflow.contrib.training.python.training import evaluation
ModuleNotFoundError: No module named 'tensorflow.contrib'

Does this repository wasn't created to move the slim away from contrib or am i mistaken?
Should i install tensorflow 1.14 instead?

This should now be fixed (perfect timing!)

+1

No more mentions of tf.contrib in the entire code base!

Thanks for the change! Yet I found the package on PyPI is still the old one, so users would have to do pip install git+https://github.com/google-research/tf-slim instead of pip install tf_slim.

I get the same error when I run ( import tensorflow.contrib.slim as slim). Any idea to figure out?

I get the same error when I run ( import tensorflow.contrib.slim as slim). Any idea to figure out?

same for me too

you need to upgrade tf_slim

you need to upgrade tf_slim

how to upgrade. I already upgrade it but also same error

upgrade tf_slim