bhancock8 opened this issue 6 years ago · 0 comments
This can remove a lot of if statements. The device is defined once and saved in self.device, for example, and then forever after, .to(device) will either keep it on the cpu or send it to the gpu.