Matlab pdist2和mvnpdf与gpuArray

时间:2017-06-09 18:35:37

标签: matlab gpuarray

我无法使用统计和机器学习工具箱的 pdist2 mvnpdf 函数和gpuArrays,虽然它明确声明它应该可以工作:

https://de.mathworks.com/help/stats/statistics-and-machine-learning-toolbox-functions-with-gpuarray-arguments.html

我该如何做到这一点?

data = randn(100,5);
mu = mean(data);

data = gpuArray(data);
mu = gpuArray(mu);

dist = pdist2(data, mu, 'euclidean')

没有gpuArrays,使用2个函数没有问题。

感谢您的帮助。

修改

我收到以下错误:

Warning: Converting non-floating point data to double. 
> In pdist2 (line 228) 
Error using pdist2mex
X and Y inputs to PDIST2MEX must both be double, or both be single.

Error in pdist2 (line 352)
        D =
        pdist2mex(X',Y',dist,additionalArg,smallestLargestFlag,radius);

0 个答案:

没有答案