0
큰 hdf5 파일 (크기 1kk x 1k)과 함께 flann을 사용하려고합니다.FLANN 및 큰 HDF5 파일
그러나 모든 flann_example.cpp의 기능에 실패
라인dataset = flann::Matrix<T>(new T[dims_out[0]*dims_out[1]], dims_out[0], dims_out[1]);
에
Matrix<float> dataset;
load_from_file(dataset, "carray.hdf5", "carray");
내가 사용 new
로 큰 메모리 청크를 할당하기를 원하는 것 때문에 큰 데이터를 처리 할 수있는 방법이 있습니까?
나는 또한 당신이는 Win32 솔루션 paltform을 사용한다는 것을, 파이썬
특별한 이유가없는 경우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'
은, 난 두려워. – patrickvacek