squidszyd opened a new issue #12141: C_API for C++ iterator only supports one data and one label for one sample URL: https://github.com/apache/incubator-mxnet/issues/12141 I'm currently implementing a C++ iterator for performance purpose. My iterator (name it `MyIterator`) provides one data and multiple labels of different shapes. These data and labels are stored in [the `data` attribute of `DataBatch` object](https://github.com/apache/incubator-mxnet/blob/master/include/mxnet/io.h#L81). The arrangement of data and labels may look like the following: ``` databatch.data[0] = data // in this case only one data is provided (image data) databatch.data[1] = label1 // the 1st label, of shape shape<dim>(?) databatch.data[2] = label2 // the 2nd label, of shape shape<dim>(?) ... ``` However, as I inspecting into the[ C API code](https://github.com/apache/incubator-mxnet/blob/master/src/c_api/c_api.cc#L745), I found that this API implementation does not take into account of multiple-data and multiple-label situation like the case above. Instead, only the 0-th data [(Line767)](https://github.com/apache/incubator-mxnet/blob/master/src/c_api/c_api.cc#L767) of `DataBatch` is taken as data and only the 1-st data [(Line745)](https://github.com/apache/incubator-mxnet/blob/master/src/c_api/c_api.cc#L745) of `DataBatch` is taken as label. All the remainders that `MyIterator` provides just get recycled. Should this issue be placed on some "feature request" ? (Nevertheless, I could go hacking by concat all my label into one and decoded at python end for this moment.)
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
