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 2018/03/09 18:06:43 UTC

[GitHub] miguelgfierro opened a new issue #10053: Get all labels from mx.io.ImageRecordIter

miguelgfierro opened a new issue #10053: Get all labels from mx.io.ImageRecordIter
URL: https://github.com/apache/incubator-mxnet/issues/10053
 
 
   I would like to get all the labels from this object
   ```python
   test = mx.io.ImageRecordIter(
       path_imgrec = "chestxray/test.rec",
       data_shape = (3, HEIGHT, WIDTH),
       path_imglist = "chestxray/test.lst",
       label_width = 15,
       batch_size = BATCHSIZE,
       shuffle = False,
       rand_mirror = 0, #flip horizontally
       preprocess_threads = 24
   )
   ```
   I'm doing:
   ```python
   for test_batch in test:
       print(type(test_batch))
       d, l = test_batch.data, test_batch.label
       la = l[0].asnumpy()
       print(la.shape)
   ```
   However, I don't get the final batch correctly. 
   
   Is there a function that loads all the labels directly to memory?
   
   

----------------------------------------------------------------
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