Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Chartrand committed Mar 29, 2021
1 parent 95b7534 commit db75a4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clctm.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ def __init__(

if use_cuda is None:
self.use_cuda = torch.cuda.is_available()
self.cvmodel = self.cvmodel.to(f'cuda:{cuda_device}')
else:
self.use_cuda = use_cuda
self.cuda_device = cuda_device
self.cuda_device = cuda_device if cuda_device is not None else
if self.use_cuda:
self.cvmodel = self.cvmodel.to(f'cuda:{self.cuda_device}')

if data is not None:
self.add_docs(data)
Expand Down

0 comments on commit db75a4c

Please sign in to comment.