2017-04-19 5 views
3

오류 : 나는 keras.layers.recurrent에서 time_distributed_dense를 가져올 시도 할 때 비슷한 오류가 발생Keras ImportError를이 : 이름 초기화를 가져올 수 없습니다

(tensorflow) [email protected]:~$ python 
Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:09:15) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2 
Type "help", "copyright", "credits" or "license" for more information. 
Anaconda is brought to you by Continuum Analytics. 
Please check out: http://continuum.io/thanks and https://anaconda.org 
>>> from keras import initializations 
Using TensorFlow backend. 
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally 
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally 
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally 
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally 
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
ImportError: cannot import name initializations 

.

아무도 도와주세요.

+0

사용중인 케라의 버전은 무엇입니까? – anonyXmous

+0

@anonyXmous'conda list'는 2.0.3 – Shindou

+0

을 보여줍니다.'import keras'; 'keras .__ version__'. 그게 무엇을 반환합니까 – putonspectacles

답변

3

Keras2.0에서 은 renamed (mirror)이 initializers입니다. 그러므로 작성해야합니다.

from keras import initializers 
+0

고마워,하지만 방금 비슷한 또 다른 문제가 :'ImportError : time_distributed_dense 이름을 가져올 수 없습니다'. 그래서'time_distributed_dense'의 새로운 이름은 무엇입니까? – Shindou

관련 문제