私はWinPython-64bit-3.5.1.1とTheanoを使用しています。インポートはTheanoの仕事と私はリカレントニューラルネットワークを訓練することさえできます。私は次のエラーを取得する畳み込みニューラルネットワークを使用しようとするただし、:dagemm(Windows 7、WinPython)の未定義参照
[...]mod.cpp:528: undefined reference to `dgemm_'\r.[...]
私はいくつかのライブラリは私のCPUのために利用可能/いない不足していることを前提としていますが、私はこの問題を解決する方法を見つけ出すことはできません。この問題をデバッグするために必要な情報を教えてください。最後にこの問題を解決してください。一例として、
、このコード(from a kaggle forum)が正常に動作します:
import numpy as np
import time
import theano
print('blas.ldflags=', theano.config.blas.ldflags)
A = np.random.rand(1000, 10000).astype(theano.config.floatX)
B = np.random.rand(10000, 1000).astype(theano.config.floatX)
np_start = time.time()
AB = A.dot(B)
np_end = time.time()
X, Y = theano.tensor.matrices('XY')
mf = theano.function([X, Y], X.dot(Y))
t_start = time.time()
tAB = mf(A, B)
t_end = time.time()
print("NP time: %f[s], theano time: %f[s] (times should be close when run on CPU!)" % (
np_end - np_start, t_end - t_start))
print("Result difference: %f" % (np.abs(AB - tAB).max(),))
出力:
blas.ldflags=
NP time: 0.452026[s], theano time: 0.491028[s] (times should be close when run on CPU!)
Result difference: 0.000000
私も、私はtheanoインポートするが、それが停止したことがないたびにエラーが発生します私のリカレントニューラルネットワークは機能していません。これはエラーです:
1 #define _CUDA_NDARRAY_C
2
3 #include <Python.h>
4 #include <structmember.h>
5 #include "theano_mod_helper.h"
6
7 #include <numpy/arrayobject.h>
8 #include <iostream>
9
10 #include "cuda_ndarray.cuh"
11
[...]
5327
5328 /*
5329 Local Variables:
5330 mode:c++
5331 c-basic-offset:4
5332 c-file-style:"stroustrup"
5333 indent-tabs-mode:nil
5334 fill-column:79
5335 End:
5336 */
5337 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=79 :
5338
===============================
nvcc : fatal error : nvcc cannot find a supported version of Microsoft Visual Studio. Only the versions 2008, 2010, and 2012 are supported
ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: ('nvcc return status', 4294967295, 'for cmd', 'nvcc -shared -O3 -Xlinker /DEBUG -D HAVE_ROUND -m64 -Xcompiler -DCUDA_NDARRAY_CUH=mc72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD -IC:\\WinPython-64bit-3.5.1.1\\python-3.5.1.amd64\\lib\\site-packages\\theano\\sandbox\\cuda -IC:\\WinPython-64bit-3.5.1.1\\python-3.5.1.amd64\\lib\\site-packages\\numpy\\core\\include -IC:\\WinPython-64bit-3.5.1.1\\python-3.5.1.amd64\\include -IC:\\WinPython-64bit-3.5.1.1\\python-3.5.1.amd64\\lib\\site-packages\\theano\\gof -o C:\\Users\\user\\AppData\\Local\\Theano\\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-3.5.1-64\\cuda_ndarray\\cuda_ndarray.pyd mod.cu -LC:\\WinPython-64bit-3.5.1.1\\python-3.5.1.amd64\\libs -LC:\\WinPython-64bit-3.5.1.1\\python-3.5.1.amd64 -lpython35 -lcublas -lcudart')
['nvcc', '-shared', '-O3', '-Xlinker', '/DEBUG', '-D HAVE_ROUND', '-m64', '-Xcompiler', '-DCUDA_NDARRAY_CUH=mc72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD', '-IC:\\WinPython-64bit-3.5.1.1\\python-3.5.1.amd64\\lib\\site-packages\\theano\\sandbox\\cuda', '-IC:\\WinPython-64bit-3.5.1.1\\python-3.5.1.amd64\\lib\\site-packages\\numpy\\core\\include', '-IC:\\WinPython-64bit-3.5.1.1\\python-3.5.1.amd64\\include', '-IC:\\WinPython-64bit-3.5.1.1\\python-3.5.1.amd64\\lib\\site-packages\\theano\\gof', '-o', 'C:\\Users\\user\\AppData\\Local\\Theano\\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-3.5.1-64\\cuda_ndarray\\cuda_ndarray.pyd', 'mod.cu', '-LC:\\WinPython-64bit-3.5.1.1\\python-3.5.1.amd64\\libs', '-LC:\\WinPython-64bit-3.5.1.1\\python-3.5.1.amd64', '-lpython35', '-lcublas', '-lcudart']
私は同じ問題について語ったが、それだけで別のサイトにリンクthisスレッドを発見しました。私はそれらの指示に従うことができますが、私はWinPythonを使用せず、最初からすべてをインストールすると仮定しています。それが唯一の方法ですか?
エラー: C: /TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: -lmkl_rtが見つかりません LIBRARY_PATH = C:¥Program Files(x86)¥IntelSWTools¥parallel_studio_xe_2017.0.036¥compilers_and_libraries_2017¥windows¥compiler¥libに設定しました。 これは間違いありませんでしたか? – user667804
libmkl_rtを持っていますか? – DaVinci
OK、パスを修正しましたが、この新しいエラーが発生しました: 例外:( 'ノードのコンパイル中に次のエラーが発生しました。'、Dot22(X、Y)、 '\ n'、 'コンパイルが失敗しました):C:/ Program Files(x86)/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win/mkl_rt.lib:シンボルの追加エラー:エラーなし\ collect2.exe:エラー:ldが終了ステータスを1つ戻しました。 '、' [Dot22(X、Y)] ') – user667804