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 2019/02/08 09:17:12 UTC

[GitHub] ginko3 commented on issue #14089: Load dataset directly to vRAM

ginko3 commented on issue #14089: Load dataset directly to vRAM
URL: https://github.com/apache/incubator-mxnet/issues/14089#issuecomment-461738709
 
 
   Sure,
   
   I create the `rec` file using `im2rec.py` with the command
   
   ```bash
   python im2rec.py dataset_train.lst dataset/ --pack-label --num-thread 8
   ```
   
   My Code looks like:
   ```python
   num_gpus = 8
   ctx = [mx.gpu(i) for i in range(num_gpus)]
   
   data_train = mx.io.ImageRecordIter(
       path_imgrec='dataset_train.rec',
       data_shape=(3, 256, 256),
       batch_size=16,
       label_width = 22,
       ctx=ctx
   )
   ```
   
   When I print a batch, it shows as written in context `mx.cpu_pinned(0)`. I would like to have it in `mx.gpu(x)`, or even split data with `gluon.utils.split_and_load()` directly.

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