soumith / imagenet-multiGPU.torch

an imagenet example in torch.
BSD 2-Clause "Simplified" License
401 stars 158 forks source link

Threaded data loading #21

Closed dasguptar closed 8 years ago

dasguptar commented 8 years ago

Looking at the addjob call here it seems that each thread loads a batch, which is then sent to the main thread to be passed through the model. However, this is happening in a multi-GPU setting, with data and model parallelism. In a single GPU setting, if I want to have a thread that loads a batch and augments the data, while another thread passes the batch through the model, how do I go about implementing such a scenario?

soumith commented 8 years ago

In a single GPU setting, if I want to have a thread that loads a batch and augments the data, while another thread passes the batch through the model, how do I go about implementing such a scenario?

Currently if you run it in the single-GPU case then:

dasguptar commented 8 years ago

So basically, I have to make a grand total of 0 changes? This was incredibly dumb of me to ask in that case. Thanks a ton.