Skip to content

Commit

Permalink
LearningToPaint: fix cuda bias code
Browse files Browse the repository at this point in the history
  • Loading branch information
weishi-deng committed Dec 11, 2023
1 parent 7de2aed commit df975be
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def prLightGray(prt): print("\033[97m {}\033[00m" .format(prt))
def prBlack(prt): print("\033[98m {}\033[00m" .format(prt))

def to_numpy(var):
return var.cpu().data.numpy() if USE_CUDA else var.data.numpy()
return var.cpu().data.numpy()

def to_tensor(ndarray, device):
return torch.tensor(ndarray, dtype=torch.float, device=device)
Expand Down

0 comments on commit df975be

Please sign in to comment.