我无法使用统计和机器学习工具箱的 pdist2 或 mvnpdf 函数和gpuArrays,虽然它明确声明它应该可以工作:
我该如何做到这一点?
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);