I am trying to run this code:
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))
but receive the error:
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?
I am working on Windows 10 64bit and an Anaconda 4.1.1 installation with:
python 3.4.5; numpy 1.11.1; theano 0.9.0.dev2; mkl 11.3.3; mkl-service 1.1.2;
I tried to figure out how to link theano to mkl but got stuck. Because the numpy.show_config() says:
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']
but the Path 'C:\Minonda\envs\_build\Library\lib' does not exist on my system.
I tried also to find the mkl installation inside C:\Anaconda\pkgs, but there is just a mkl-11.3.3-1.tar.bz2 file.
Also I installed Intel MKL separately and tried to add
[blas]
ldflags = -LC:\Program Files(x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\mkl\include
to my theanorc.txt, which leads to the error:
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"')
How am I able to link the anaconda mkl or the intel mkl correctly to my theano?