text_plain_output_1.png
import numpy as np

import random

import torch

def set_seed(seed=0):
    np.random.seed(seed)
    random.seed(seed)
    torch.manual_seed(seed)
set_seed()

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
device