learnopencv
learnopencv copied to clipboard
How to infer 1 input 5 output model?
Hi! Your source code is helping me a lot. But my model has 1 input and 5 outputs. I created a buffers of size 6(1+5) using the source code.
Then, I changed
preprocessImage(image_path, (float*) buffers[0], input_dims[0]);
context->enqueue(batch_size, buffers.data(), 0, nullptr);
postprocessResults((float*) buffers[1], output_dims[0], batch_size);
to
preprocessImage(image_path, (float*) buffers[0], input_dims[0]);
context->executeV2(buffers.data());
postprocessResults((float*) buffers[1], output_dims[0], batch_size);
I got malloc_consolidate(): invalid chunk size
error, and I don't know if this is the correct way.