Solved by raymank26 in post #2 
              
              
                Answering my own question. 
The fix is easy. First, the load is CPU bound indeed. To move the computation to GPU (as we want to) we can change the code above to introduce batching on Dataset level by specifying sampler in DataLoader or implement batching by ourselves. 
I’ve followed the second appro…