2017-07-28 88 views
1

如果不使用C++編譯器,我的設置(見下文)效果很好(當然速度很慢)。 爲了加速運行時間,我嘗試安裝TDM-GCC。然後顯示導入錯誤「DLL加載失敗」。 花費數小時閱讀安裝指南,下載OpenBLAS,試驗,閱讀問題/評論到「DLL加載失敗」 - 我沒有前進。 任何人都可以幫助我嗎?在Windows 10上爲Theano安裝TDM-GCC/OpenBLAS時出現問題 - DLL加載失敗

安裝的軟件:

  • 的Windows 10家

  • 的Python 3.6.1(v3.6.1:69c0db5,2017年3月21日,18點41分36秒)[MSC v.1900 64位(AMD64)]在Win32

  • numpy的(1.13.0rc2 + MKL)(安裝爲輪)

  • SciPy的(0.19.0)(安裝爲輪)
  • scikit學習(0.18.1)(安裝爲輪)
  • Theano(0.9.0)
  • Keras(2.0.6)

  • gcc版本5.1.0(tdm64-1)

  • OpenBLAS-v0.2.19-Win64上,INT32

我添加了以下項的路徑:

C:\Python36\ 
C:\TDM-GCC-64\bin\ 
C:\TDM-GCC-64\x86_64-w64-mingw32\bin\ 
C:\TDM-GCC-64\x86_64-w64-mingw32\lib\ 
C:\TDM-GCC-64\lib\gcc\x86_64-w64-mingw32\5.1.0\ 
C:\TDM-GCC-64\libexec\gcc\x86_64-w64-mingw32\5.1.0\ 
C:\OpenBLAS-v0.2.19-Win64-int32\bin\ 
C:\OpenBLAS-v0.2.19-Win64-int32\lib\ 

我theaonrc.txt看起來是這樣的:

[global] 
floatX = float32 
device = cpu 
cxx=C:\\TDM-GCC-64\\bin\\g++.exe 

[blas] 
ldflags = -LC:\\OpenBLAS-v0.2.19-Win64-int32\\bin -LC:\\OpenBLAS-v0.2.19- Win64-int32\\lib -lopenblas 

錯誤日誌:

Using Theano backend. 
WARNING (theano.gof.compilelock): Overriding existing lock by dead process '1004' (I am process '6472') 
Traceback (most recent call last): 
    File "C:/Christian/Python/DL.py", line 15, in <module> 
model.add(Dense(12, input_dim=8, activation='relu')) 
    File "C:\Python36\lib\site-packages\keras\models.py", line 436, in add 
layer(x) 
    File "C:\Python36\lib\site-packages\keras\engine\topology.py", line 569, in __call__ 
self.build(input_shapes[0]) 
    File "C:\Python36\lib\site-packages\keras\layers\core.py", line 825, in build 
constraint=self.kernel_constraint) 
    File "C:\Python36\lib\site-packages\keras\legacy\interfaces.py", line 87, in wrapper 
return func(*args, **kwargs) 
    File "C:\Python36\lib\site-packages\keras\engine\topology.py", line 391, in add_weight 
weight = K.variable(initializer(shape), dtype=dtype, name=name) 
    File "C:\Python36\lib\site-packages\keras\initializers.py", line 208, in __call__ 
dtype=dtype, seed=self.seed) 
    File "C:\Python36\lib\site-packages\keras\backend\theano_backend.py", line 2191, in random_uniform 
return rng.uniform(shape, low=minval, high=maxval, dtype=dtype) 
    File "C:\Python36\lib\site-packages\theano\sandbox\rng_mrg.py", line 1354, in uniform 
rstates = self.get_substream_rstates(nstreams, dtype) 
    File "C:\Python36\lib\site-packages\theano\configparser.py", line 117, in res 
return f(*args, **kwargs) 
    File "C:\Python36\lib\site-packages\theano\sandbox\rng_mrg.py", line 1256, in get_substream_rstates 
multMatVect(rval[0], A1p72, M1, A2p72, M2) 
    File "C:\Python36\lib\site-packages\theano\sandbox\rng_mrg.py", line 66, in multMatVect 
[A_sym, s_sym, m_sym, A2_sym, s2_sym, m2_sym], o, profile=False) 
    File "C:\Python36\lib\site-packages\theano\compile\function.py", line 326, in function 
output_keys=output_keys) 
    File "C:\Python36\lib\site-packages\theano\compile\pfunc.py", line 486, in pfunc 
output_keys=output_keys) 
    File "C:\Python36\lib\site-packages\theano\compile\function_module.py", line 1795, in orig_function 
defaults) 
    File "C:\Python36\lib\site-packages\theano\compile\function_module.py", line 1661, in create 
input_storage=input_storage_lists, storage_map=storage_map) 
    File "C:\Python36\lib\site-packages\theano\gof\link.py", line 699, in make_thunk 
storage_map=storage_map)[:3] 
    File "C:\Python36\lib\site-packages\theano\gof\vm.py", line 1047, in make_all 
impl=impl)) 
    File "C:\Python36\lib\site-packages\theano\gof\op.py", line 935, in make_thunk 
no_recycling) 
    File "C:\Python36\lib\site-packages\theano\gof\op.py", line 839, in make_c_thunk 
output_storage=node_output_storage) 
    File "C:\Python36\lib\site-packages\theano\gof\cc.py", line 1190, in make_thunk 
keep_lock=keep_lock) 
    File "C:\Python36\lib\site-packages\theano\gof\cc.py", line 1131, in __compile__ 
keep_lock=keep_lock) 
    File "C:\Python36\lib\site-packages\theano\gof\cc.py", line 1586, in cthunk_factory 
key=key, lnk=self, keep_lock=keep_lock) 
    File "C:\Python36\lib\site-packages\theano\gof\cmodule.py", line 1159, in module_from_key 
module = lnk.compile_cmodule(location) 
    File "C:\Python36\lib\site-packages\theano\gof\cc.py", line 1489, in compile_cmodule 
preargs=preargs) 
    File "C:\Python36\lib\site-packages\theano\gof\cmodule.py", line 2325, in compile_str 
return dlimport(lib_filename) 
    File "C:\Python36\lib\site-packages\theano\gof\cmodule.py", line 302, in dlimport 
rval = __import__(module_name, {}, {}, [module_name]) 
ImportError: DLL load failed: Eine DLL-Initialisierungsroutine ist fehlgeschlagen. 

回答