setdefaulttensortype(torch.CudaTensor) bad practice?

已查看 26 次
跳至第一个未读帖子

Yathindu Rangana

未读,
2016年10月17日 09:16:522016/10/17
收件人 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

未读,
2016年10月19日 18:08:122016/10/19
收件人 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
回复全部
回复作者
转发
0 个新帖子