Allocator 'n' exceeds maximum supported size

asked 2018-01-23 05:07:40 -0600

teenvan95 gravatar image

I am trying to create a training set for training a DTree but I keep getting the following error:

libc++abi.dylib: terminating with uncaught exception of type std::length_error: allocator<t>::allocate(size_t n) 'n' exceeds maximum supported size

The code for your reference:-

cout<<"Creating and training dtree\n";
Ptr<ml::DTrees> model = ml::DTrees::create();
model->train(ml::TrainData::create(data, ml::ROW_SAMPLE, labels));
Mat prediction;
prediction = model->predict(data);

Size of the data set - 388 x 7020 - Features 388 x 1 - Labels 128x112 - Size of an Image 7020- Size of the HOG Descriptors

edit retag flag offensive close merge delete

Comments

Possibly you are using a 32 bit compiler and your data exceeds 4GB of memory? If so, build in 64 bit and you should be fine.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-01-23 05:27:14 -0600 )edit