在Theano计算点积时出错

1 投票
1 回答
2978 浏览
提问于 2025-04-18 13:42

我有一段简单的代码是用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 个回答

3

从你收到的错误信息来看,似乎Theano找不到名为libmkl_intel_lp64.dylib的mkl库文件。

你是怎么配置你的Theano的?特别是,blas库的部分?

请查看Theano安装手册中的这一部分,里面有关于问题解决的内容。

撰写回答