MATLAB pdist2 with gpuArray

11 ビュー (過去 30 日間)
Daniel
Daniel 2017 年 6 月 10 日
編集済み: Daniel 2017 年 6 月 14 日
I have trouble using the pdist2 function of the Statistics and Machine Learning Toolbox with gpuArrays, although its explicitly stated that it should work:
How can I make this work?
data = randn(100,5);
mu = mean(data);
data = gpuArray(data);
mu = gpuArray(mu);
dist = pdist2(data, mu, 'euclidean')
Without gpuArrays, there is no problem with using the 2 functions.
Thanks for your help.
Edit
I am getting the following error:
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);
  2 件のコメント
Edric Ellis
Edric Ellis 2017 年 6 月 12 日
Which version of MATLAB are you using? I just tried that using R2017a and it succeeded.
Daniel
Daniel 2017 年 6 月 14 日
I am using R2016a.
With the mvnpdf function I was mistaken. This works without problems. But the pdist2 still does not work with the given code above.
By now, I am using an implementation from Matlab File Exchange which works with gpuArrays.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by