首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Theano AttributeError:'module‘对象没有’AttributeError‘属性

Theano AttributeError:'module‘对象没有’AttributeError‘属性
EN

Stack Overflow用户
提问于 2017-03-12 02:05:06
回答 1查看 1.5K关注 0票数 4

我已经安装了Keras和Theano后端,它工作得很好,但突然我在导入keras时出现了以下错误:

代码语言:javascript
复制
    Using Theano backend.
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-570b835f182b> in <module>()
      1 # import keras
----> 2 from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img
      3 from keras.models import Sequential
      4 from keras.layers import Convolution2D, MaxPooling2D
      5 from keras.layers import Activation, Dropout, Flatten, Dense

/home/pjwstk.edu.pl/s16352/python/keras/keras/__init__.py in <module>()
      1 from __future__ import absolute_import
----> 2 from . import backend
      3 from . import datasets
      4 from . import engine
      5 from . import layers

/home/pjwstk.edu.pl/s16352/python/keras/keras/backend/__init__.py in <module>()
     62 if _BACKEND == 'theano':
     63     sys.stderr.write('Using Theano backend.\n')
---> 64     from .theano_backend import *
     65 elif _BACKEND == 'tensorflow':
     66     sys.stderr.write('Using TensorFlow backend.\n')

/home/pjwstk.edu.pl/s16352/python/keras/keras/backend/theano_backend.py in <module>()
----> 1 import theano
      2 from theano import tensor as T
      3 from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
      4 from theano.tensor.signal import pool
      5 from theano.tensor.nnet import conv3d2d

/home/pjwstk.edu.pl/s16352/python/Theano/theano/__init__.pyc in <module>()
     98 # needed during that phase.
     99 import theano.tests
--> 100 if hasattr(theano.tests, "TheanoNoseTester"):
    101     test = theano.tests.TheanoNoseTester().test
    102 else:

AttributeError: 'module' object has no attribute 'tests'

我在服务器上的Jupyter笔记本上运行它。有什么线索吗?

EN

回答 1

Stack Overflow用户

发布于 2017-06-03 08:48:33

你需要安装一个旧版本的Theano: 0.8.2。试试pip install Theano==0.8.2

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42738725

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档