title: Setting device for pytorch version 0.3.1.post2
body: <p>In newer versions of pytorch, you can set the device by using torch.device. I need to use torch version 0.3.1.post2 for some legacy code. How do I set the device for this version?</p>