update test.py model.half()

pull/1/head
Glenn Jocher 5 years ago
parent 41ff83a98d
commit 0afbb8d498

@ -41,9 +41,9 @@ def test(data,
# model = nn.DataParallel(model) # model = nn.DataParallel(model)
# Half # Half
half = device.type != 'cpu' and torch.cuda.device_count() == 1 # half precision only supported on single-GPU half = device.type != 'cpu' # half precision only supported on CUDA
if half: if half:
model.half() # to FP16 model.half()
# Configure # Configure
model.eval() model.eval()

Loading…
Cancel
Save