Spaces:
Sleeping
Sleeping
""" | |
File: gpu_init.py | |
Author: Elena Ryumina and Dmitry Ryumin | |
Description: GPU initialization. | |
License: MIT License | |
""" | |
import torch | |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") | |