Jhp commited on
Commit
aca6c75
1 Parent(s): ad5d681
Files changed (1) hide show
  1. main.py +2 -0
main.py CHANGED
@@ -47,6 +47,8 @@ def main(args):
47
  if args.frozen_weights is not None:
48
  print("Freeze weights for detector")
49
 
 
 
50
  device = torch.device(args.device)
51
 
52
  # fix the seed for reproducibility
 
47
  if args.frozen_weights is not None:
48
  print("Freeze weights for detector")
49
 
50
+ if not torch.cuda.is_available():
51
+ args.device = 'cpu'
52
  device = torch.device(args.device)
53
 
54
  # fix the seed for reproducibility