setdefaulttensortype(torch.CudaTensor) bad practice?

26 views
Skip to first unread message

Yathindu Rangana

unread,
Oct 17, 2016, 9:16:52 AM10/17/16
to torch7
Hi all,

Is it bad practice to call setdefaulttensortype(torch.CudaTensor)  at the start of the program? I imagine this would cause every tensor created to be on the GPU and waste memory?

Thanks!

Simon Niklaus

unread,
Oct 19, 2016, 6:08:12 PM10/19/16
to torch7
You might have difficulties with your training data. In general, you want that to reside in the main memory since the memory in you graphics card is limited. This practice might furthermore slow the data augmentation down since the data might need to be copied back to the main memory (depending on how the augmentation is implemented).

- Simon
Reply all
Reply to author
Forward
0 new messages