Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Allocator 'n' exceeds maximum supported size

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