Spaces:
Runtime error
Runtime error
2424
Browse files
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
|