Sadjad Alikhani commited on
Commit
6148f7d
·
verified ·
1 Parent(s): 8406d02

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +1 -2
inference.py CHANGED
@@ -26,8 +26,7 @@ warnings.filterwarnings('ignore')
26
  from input_preprocess import *
27
 
28
  # Device configuration
29
- device_idx_ds = 3
30
- device = torch.device(f'cuda:{device_idx_ds}' if torch.cuda.is_available() else "cpu")
31
  if torch.cuda.is_available():
32
  torch.cuda.empty_cache()
33
 
 
26
  from input_preprocess import *
27
 
28
  # Device configuration
29
+ device = torch.device(cuda if torch.cuda.is_available() else "cpu")
 
30
  if torch.cuda.is_available():
31
  torch.cuda.empty_cache()
32