我試圖運行此代碼優化卷積:接收Asse田,而在theano
x_set = np.random.rand(100,100,100)
x = T.dtensor3('x')
inp = x.reshape((100, 1, 100, 100))
W_stdDev = np.sqrt(2./(3 * 3 * 2))
W = theano.shared(
np.asarray(
np.random.normal(loc=.0, scale=W_stdDev, size=(3,1,3,3)),
dtype=theano.config.floatX
),
borrow=True
)
conv_out = conv2d(
input=inp,
filters=W,
filter_shape=(3,1,3,3),
)
train_model = theano.function(
inputs=[x],
outputs=conv_out,
)
print(train_model(x_set))
但收到錯誤消息:
AssertionError: AbstractConv2d Theano optimization failed: there is no implementation available supporting the requested options. Did you exclude both "conv_dnn" and "conv_gemm" from the optimizer? If on GPU, is cuDNN available and does the GPU support it? If on CPU, do you have a BLAS library installed Theano can link against?
我在Windows 10 64位工作和蟒蛇4.1.1安裝與:
python 3.4.5; numpy 1.11.1; theano 0.9.0.dev2; mkl 11.3.3; mkl-service 1.1.2;
我試圖找出如何鏈接theano mkl但卡住了。因爲numpy.show_config()說:
blas_opt_info:
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['C:\\Minonda\\envs\\_build\\Library\\include']
libraries = ['mkl_core_dll', 'mkl_intel_lp64_dll', 'mkl_intel_thread_dll']
library_dirs = ['C:\\Minonda\\envs\\_build\\Library\\lib']
openblas_lapack_info:
NOT AVAILABLE
lapack_mkl_info:
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['C:\\Minonda\\envs\\_build\\Library\\include']
libraries = ['mkl_lapack95_lp64', 'mkl_core_dll', 'mkl_intel_lp64_dll', 'mkl_intel_thread_dll']
library_dirs = ['C:\\Minonda\\envs\\_build\\Library\\lib']
mkl_info:
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['C:\\Minonda\\envs\\_build\\Library\\include']
libraries = ['mkl_core_dll', 'mkl_intel_lp64_dll', 'mkl_intel_thread_dll']
library_dirs = ['C:\\Minonda\\envs\\_build\\Library\\lib']
lapack_opt_info:
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['C:\\Minonda\\envs\\_build\\Library\\include']
libraries = ['mkl_lapack95_lp64', 'mkl_core_dll', 'mkl_intel_lp64_dll', 'mkl_intel_thread_dll']
library_dirs = ['C:\\Minonda\\envs\\_build\\Library\\lib']
blas_mkl_info:
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['C:\\Minonda\\envs\\_build\\Library\\include']
libraries = ['mkl_core_dll', 'mkl_intel_lp64_dll', 'mkl_intel_thread_dll']
library_dirs = ['C:\\Minonda\\envs\\_build\\Library\\lib']
但路徑 'C:\ Minonda \ ENVS \ _build \圖書館\ lib中' 沒有我的系統上。
我也試過裏面找C中的MKL安裝:\蟒蛇\ PKGS,但僅僅是一個MRL-11.3.3-1.tar.bz2文件。
而且我單獨安裝英特爾MKL,並試圖
[blas]
ldflags = -LC:\Program Files(x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\mkl\include
添加到我的theanorc.txt,從而導致錯誤:
ValueError: ('The following error happened while compiling the node', CorrMM{valid, (1, 1), (1, 1)}(InplaceDimShuffle{0,x,1,2}.0, Elemwise{Cast{float64}}.0), '\n', 'invalid token "Files" in ldflags_str: "-LC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\mkl\include"')
我怎麼能夠鏈接森蚺MKL或intel mkl對我的theano正確嗎?
我真的懷疑這些庫不能處理文件路徑的空間......所以,我們可能需要重新安裝顯示mkl在另一條路上,我不知道該怎麼做,我真的不想把我的電腦搞得這麼厲害:'( –