ModuleNotFoundError: No module named 'tensorflow.contrib

I am using google colab and found this error. Please help me I want to import rnn and slim through 'tensorflow.contrib.

tf.contrib was removed in version 1.14 or 1.15. What is your tf version?

I am using colab version is 2.5

You cant try with tf1.14

@Swati_Zambre Did you try the following way of importing slim

!pip install tf_slim
import tf_slim as slim

Check this response for more details. Thanks!

Share a standalone code to reproduce your error. Thanks!

2 Likes