我需要用float64精度矩阵进行矩阵乘法运算。 以下代码可用于float32和matrix()而不是dmatrix()。 但是,当涉及到float64时,它会失败。Theano float64矩阵乘积值错误
import theano
from theano import tensor as T
import numpy
x = numpy.ones((20000, 100), dtype=numpy.float64)
m = T.dmatrix()
mTm = T.dot(m.T, m)
f = theano.function([m], mTm)
f(x)
r = f(x)
r.shape
我有以下错误:
THEANO_FLAGS=device=gpu0 python test.py
Using gpu device 0: GeForce GTX 750 Ti
Traceback (most recent call last):
File "test.py", line 7, in <module>
f = theano.function([m], mTm)
File "c:\Python27\lib\site-packages\theano\compile\function.py", line 223, in function
...
ValueError: ('The following error happened while compiling the node', Dot22(Inpl
aceDimShuffle{1,0}.0, <TensorType(float64, matrix)>), '\n', 'invalid token in co
nfig.blas.ldflags', 'asdfadf')
make: *** [test] Error 1
我怎样才能解决这个问题?