import torch


def check_GPU_availability(cuda_n=0):
    """
    Checks if GPU is available

    :return: avilable device name
    """
    if torch.cuda.is_available(): # Check we're using GPU
        torch.backends.cudnn.deterministic = True
        device = 'cuda:%s' %(cuda_n)
    else:
        device = 'cpu'

    return device