application_vnd.jupyter.stderr_output_2.png text_plain_output_3.png text_plain_output_1.png
import torch

import torch
use_cuda = torch.cuda.is_available()
print('Use CUDA:', use_cuda)
if torch.cuda.is_available():
    device = torch.device('cuda')
else:
    device = torch.device('cpu')