Skip to content

PyTorch notebooks should detect GPU and run on it if it's available #435

@dniku

Description

@dniku
device = 'cuda' if torch.cuda.is_available() else 'cpu'
...
model = model.to(device)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions