C api batch mode

I’ve used this example code: link as a basis for running my MXNet model in CPP.

How would you go to extend this code to run in batch mode instead of image after image?

Not exactly an answer to your question, but there’s currently discussion about what people need from the C++ API going on the dev@ list: https://lists.apache.org/list.html?dev@mxnet.apache.org:2018-9

I would like to know the answer too, right now the batch size is fixed when we create the Executor.

You can use MXPredSetInput to set the batch_size, for instance:

MXPredSetInput(pred, "data", batch_data.data(), batch_size * image_size);
MXPredForward(pred);

where batch_data is a std::vector<mx_float> containing the batch of images.

I wrote an example with batch processing by c++ api, you can check it on github.