greentfrapp / lucent

Lucid library adapted for PyTorch
Apache License 2.0
597 stars 89 forks source link

Change torch device #30

Open rachtibat opened 3 years ago

rachtibat commented 3 years ago

Hi,

Thank you for this amazing library. Do you know a simple way to change the GPU device of param_f = lambda: param.image(self.image_shape[0], self.image_shape[1], batch=1, channels=channels)

In the file lucent.optvis.param.spatial.py the device is set by device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") But I'd like to set the device to "cuda:1" for instance.

Thanks!