Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/163.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 犰狳princomp内存不足_C++_Out Of Memory_Pca_Armadillo - Fatal编程技术网

C++ 犰狳princomp内存不足

C++ 犰狳princomp内存不足,c++,out-of-memory,pca,armadillo,C++,Out Of Memory,Pca,Armadillo,我试图使用犰狳库的princomp函数从fmat矩阵m(67584 x 396)中提取PCA成分。 代码如下: fmat eigenVec, score; fvec eigenVal, t; princomp(eigenVec, score, eigenVal, t, trans(m)); 我得到这个错误: error: arma::memory::acquire(): out of memory terminate called after throwing an instance of

我试图使用犰狳库的
princomp
函数从
fmat
矩阵
m
(67584 x 396)中提取PCA成分。 代码如下:

fmat eigenVec, score;
fvec eigenVal, t;
princomp(eigenVec, score, eigenVal, t, trans(m));
我得到这个错误:

error: arma::memory::acquire(): out of memory

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
然而,在代码的其他部分,我管理比这个更大的矩阵(
m

我在Debian上运行这段代码,8GB内存

编辑:我有这个错误

 error: Mat::init(): requested size is too large

terminate called after throwing an instance of 'std::logic_error'
  what():  Mat::init(): requested size is too large
之前,我修改了config.hpp文件来解析(如中所示)