You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/05 03:52:10 UTC

[GitHub] squidszyd opened a new issue #8947: Unmatched data: before dataloader 'yield' and during metric 'update'

squidszyd opened a new issue #8947: Unmatched data: before dataloader 'yield' and during metric 'update'
URL: https://github.com/apache/incubator-mxnet/issues/8947
 
 
   I'm coming up with a strange issue with my model: the data before `yield()` in dataloader does not match that in `update()` in custom evalution metric.
   For instance, every batch, my dataloader generates two inputs and one label. The inputs contain input images `I` and bounding boxes `B`. The label contains a response map label `R` of the object in that bounding box. 
   However, when I visualize these data in `update()` function in custom metric, the response map label `I` does not match the input frame `F` and bounding box `B`. Actually, the response map label `I` is the label of next batch. In other word, the label comes earlier than data.
   But when I check the consistency before dataloader yielding, they are all matched.
   So, what's going wrong here?
   
   Code may look like this:
   ```
   # dataloader
   R = label of this batch
   I = input image of this batch
   B = input bounding box of this batch
   visualize_data(R, I, B) # Fine, data are matched
   yield Batch(...)
   ```
   ```
   metric.update(self, preds, labels):
       R = labels[0].asnumpy()
       I = preds[3].asnumpy()  # assume the 3rd output is input frame to the model
       B = preds[2].asnumpy() # assume the 2nd output is the input bounding box to the model
       visualize_data(R, I, B) # Data does not match, R comes earlier than I and B
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services