Skip to content

Change torch device #30

@rachtibat

Description

@rachtibat

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions