glenn-jocher commited on
Commit
0afbb8d
·
1 Parent(s): 41ff83a

update test.py model.half()

Browse files
Files changed (1) hide show
  1. test.py +2 -2
test.py CHANGED
@@ -41,9 +41,9 @@ def test(data,
41
  # model = nn.DataParallel(model)
42
 
43
  # Half
44
- half = device.type != 'cpu' and torch.cuda.device_count() == 1 # half precision only supported on single-GPU
45
  if half:
46
- model.half() # to FP16
47
 
48
  # Configure
49
  model.eval()
 
41
  # model = nn.DataParallel(model)
42
 
43
  # Half
44
+ half = device.type != 'cpu' # half precision only supported on CUDA
45
  if half:
46
+ model.half()
47
 
48
  # Configure
49
  model.eval()