已安装keras和tensorflow但收到错误

时间:2018-01-12 17:51:06

标签: python tensorflow keras anaconda jupyter-notebook

我得到了这个importerror
即使我已经安装了所有必要的模块,如keras,tensorflow等, 即使在康茄舞环境中工作,我也无法解决它。

  

ImportError:没有名为python.training的模块

#Imports 
import os
from random import shuffle

#Keras imports
from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img
from keras.models import Sequential
from keras.layers import Convolution2D, MaxPooling2D
from keras.layers import Activation, Dropout, Flatten, Dense
#Imports 
import os
from random import shuffle

#Keras imports
from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img
from keras.models import Sequential
from keras.layers import Convolution2D, MaxPooling2D
from keras.layers import Activation, Dropout, Flatten, Dense
Using TensorFlow backend.
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-383ae65daf54> in <module>()
      4 
      5 #Keras imports
----> 6 from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img
      7 from keras.models import Sequential
      8 from keras.layers import Convolution2D, MaxPooling2D

build/bdist.macosx-10.13-x86_64/egg/keras/__init__.py in <module>()

build/bdist.macosx-10.13-x86_64/egg/keras/utils/__init__.py in <module>()

build/bdist.macosx-10.13-x86_64/egg/keras/utils/conv_utils.py in <module>()

build/bdist.macosx-10.13-x86_64/egg/keras/backend/__init__.py in <module>()

build/bdist.macosx-10.13-x86_64/egg/keras/backend/tensorflow_backend.py in <module>()

ImportError: No module named python.training

0 个答案:

没有答案