Hello rkp!



 rkp768:

When I try to put enitre TainingData/Labels to GPU, the run seems to abruptly end without any error at line op = net(x). But when I put individual inputs and labels to GPU the run works perfectly. Can anyone explain why ?


My guess would be that you’re getting a gpu out-of-memory error,
but, for some reason, not getting a clean error message.


Also, pytorch tutorial mentions “Remember that you will have to send the inputs and targets at every step to the GPU too:”. Why not entire input/target at the beginning, instead of at every step ?


I have done exactly this (with a smallish problem that fits in
the gpu).
I moved my entire training (and test) set, both inputs and labels,
to the gpu at the beginning, and then indexed into them with
randomly shuffled indices to “create” my batches.  This worked
fine for me.
Good luck.
K. Frank