我需要用float64精度矩阵做矩阵乘法。 以下代码在float32和matrix()中工作,而不是在dmatrix()中工作。 但是,当谈到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
我有以下错误:
^{pr2}$我该怎么解决这个问题?在
这个问题与GPU无关,而是您用于Theano标志的值blas.ld标志:'asdfadf'
当再次编译blas时,它被传递给g++。您没有输入值g++参数。在
查看the deep learning tutorial here看看现在只有当
float32
被传递时,no计算才从GPU中受益。另请参阅邮件列表上的this thread。在相关问题 更多 >
编程相关推荐