我需要用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
我怎樣才能解決這個問題?