Hi I just installed Tensorflow
on my Mac and I want to use tf.contrib.slim
but when I use it I get this
import tensorflow as tf
s
for running it on python3 I used pip3 to install
pip3 install tensorflow
This worked for me
Starting from tensorflow 13.1 there's no contrib. You can use without it slim = tf.slim
or you can install pip install tensorflow==1.13
and use it
first unistall tensorflow
pip uninstall tensorflow
then install 1.13.2 version
pip install tensorflow==1.13.2
it works.. had the same issue.. but installing tensorflow 1.13.2 solved it!
the newer version of tensorflow doesn't have
Currently the default install of tensorflow is 2.x while your code is for 1.x. The contrib module has been removed from tf 2.x. Check the warnings:
"The TensorFlow contrib module will not be included in TensorFlow 2.0"
Uninstall tensorflow and then install the 1.x version with
pip install tensorflow==1.15
tf.contrib has moved out of TF starting TF 2.0 alpha.
You can upgrade your TF 1.x code to TF 2.x using the tf_upgrade_v2 script https://www.tensorflow.org/alpha/guide/upgrade
I solved this by below method.
pip uninstall tensorflow_estimator
pip install tensorflow_estimator
the reference is : https://github.com/tensorflow/tensorflow/issues/27079