首页 文章

“ImportError:没有名为core_rnn的模块”当我使用tensorflow并使用tflearn时?

提问于
浏览
0

该程序可以是downloaded来自:

错误:

Traceback(最近一次调用最后一次):文件“/ home / imatrix / download / chrisruk / cnn-master / train_cnn.py”,第7行,在import tflearn文件“/usr/local/lib/python2.7/dist- packages / tflearn / init.py“,第21行,来自.layers导入规范化文件”/usr/local/lib/python2.7/dist-packages/tflearn/layers/init.py“,第10行,来自 . recurrent import lstm,gru,simple_rnn,bidirectional_rnn,\ File“/usr/local/lib/python2.7/dist-packages/tflearn/layers/recurrent.py”,第8行,在ImportError中:没有名为core_rnn的模块

2 回答

  • 0

    最可能的错误是因为 tflearntensorflowincompatible versions . (可能您已更新 tflearn ,但未更新 tensorflow ) .

    尝试删除 tensorflowtflearn 包并安装最新版本:

    pip uninstall tflearn 
    pip uninstall tensorflow
    pip install -I tensorflow
    pip install -I tflearn
    

    或者,如果您不想使用 tensorflow v1.0 ,则安装两个软件包的旧版本:

    pip uninstall tflearn 
    pip uninstall tensorflow
    pip install -I tensorflow==0.12.1
    pip install -I tflearn==0.2.1
    
  • 1

    假设 Tf 0.12 以后这些已被移至:

    tf.contrib.rnn [followed by whichever core_rnn. you need ]
    

相关问题