0

大きな hdf5 ファイル (寸法 1kk x 1k) で flann使用しようとしています。

しかし、flann_example.cpp の関数ではすべて失敗します

Matrix<float> dataset;
load_from_file(dataset, "carray.hdf5", "carray");

オンライン

dataset = flann::Matrix<T>(new T[dims_out[0]*dims_out[1]], dims_out[0], dims_out[1]);

大きなメモリチャンクを割り当てたいようですnew

2Gbのwin32を使っていますが、そのようなビッグデータを処理する方法はありますか?

私もpythonで試しました

def using_pyflann():
    N=10000*6  # for 100k x 1k don't work
    dim=1000
    type=np.int32  #int8 can't be used?
    x = np.array(np.random.rand(N, dim)*10, dtype=type)
    perm = np.random.permutation(N)
    fl= FLANN()
    fl.build_index(x)
    pt= np.array(np.random.rand(1, dim)*10, dtype=type)
    t0= time.time()
    res, dist= fl.nn_index(pt)
    print (time.time()-t0)
    print res
    print dist
    print 'done'
4

1 に答える 1

0

win32 ソリューション paltform を使用しなければならない特別な理由がない場合は、x64 プラットフォームに切り替える必要があります。Win32 プラットフォームでは、約 2GB を超えるメモリを割り当てることはできません。

https://software.intel.com/en-us/articles/memory-limits-applications-windows

于 2014-09-09T12:35:05.370 に答える