在Theano中计算点积时出错

时间:2014-07-17 13:09:29

标签: python numpy theano deep-learning

我有以下在Theano中编写的简单代码,我在编译函数f时遇到错误:

import theano.tensor as T
x = T.dmatrix('x')
w = T.dmatrix('w')
y = T.dot(x,w)

f = function([x,w],y)

ImportError: ('The following error happened while compiling the node', Dot22(x, w), '\n', 'dlopen(../.theano/compiledir_Darwin-13.3.0-x86_64-i386-64bit-i386-2.7.8-64/tmpTqQ0iS/b6135ddd19d268ad3182850548638ec3.so, 2): Library not loaded: libmkl_intel_lp64.dylib\n  Referenced from: ../.theano/compiledir_Darwin-13.3.0-x86_64-i386-64bit-i386-2.7.8-64/tmpTqQ0iS/b6135ddd19d268ad3182850548638ec3.so\n  Reason: image not found', '[Dot22(x, w)]')   

我身边出了什么问题?

1 个答案:

答案 0 :(得分:3)

从错误消息中你可以看到theano找不到mkl库文件libmkl_intel_lp64.dylib。

如何配置你的theano?特别是blas library

请查看theano安装手册的this section