Why I cannot import Tensorflow.contrib I get an error of No module named 'tensorflow.python.saved

后端 未结 7 1250
离开以前
离开以前 2020-12-05 18:25

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         


        
相关标签:
7条回答
  • 2020-12-05 19:08

    For anyone who is trying some old codes from github with Tensorflow 1.x.x versions while having Tensorflow 2.0.x please note that tf.contrib no longer exist in Tensorflow 2.0.x and it's modules were moved.
    Please google the name of the module without the tf.contrib part to know it's new location and thus migrating your code accordingly by correcting the import statement.

    Hope this helped!

    0 讨论(0)
提交回复
热议问题