def set_use_gpu(self, use_gpu: bool):
    self.use_gpu = use_gpu
    assert ((not self.use_gpu) or torch.cuda.is_available()), 'CUDA required to train on GPUs'
    return self
def set_use_gpu(self, use_gpu: bool):
    self.use_gpu = use_gpu
    assert ((not self.use_gpu) or torch.cuda.is_available()), 'CUDA required to train on GPUs'
    return self