Sadjad Alikhani
commited on
Update inference.py
Browse files- inference.py +1 -2
inference.py
CHANGED
@@ -26,8 +26,7 @@ warnings.filterwarnings('ignore')
|
|
26 |
from input_preprocess import *
|
27 |
|
28 |
# Device configuration
|
29 |
-
|
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 |
|