setdefaulttensortype(torch.CudaTensor) bad practice?
26 views
Skip to first unread message
Yathindu Rangana
unread,
Oct 17, 2016, 9:16:52 AM10/17/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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).