Skip to content

Commit e02a67c

Browse files
committed
torch cuda is available
Signed-off-by: Richard Brown <[email protected]>
1 parent 6b488c1 commit e02a67c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/test_testtimeaugmentation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import numpy as np
1717
import torch
18-
from torch._C import has_cuda
1918

2019
from monai.data import CacheDataset, DataLoader, create_test_image_2d
2120
from monai.data.test_time_augmentation import TestTimeAugmentation
@@ -55,7 +54,7 @@ def tearDown(self) -> None:
5554

5655
def test_test_time_augmentation(self):
5756
input_size = (20, 20)
58-
device = "cuda" if has_cuda else "cpu"
57+
device = "cuda" if torch.cuda.is_available() else "cpu"
5958
num_training_ims = 10
6059
data = []
6160
custom_create_test_image_2d = partial(

0 commit comments

Comments
 (0)