From 0afbb8d49829becef83707ab76f9e7dc9106436b Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 12 Jul 2020 13:25:58 -0700 Subject: [PATCH] update test.py model.half() --- test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index ef97d26..f819bae 100644 --- a/test.py +++ b/test.py @@ -41,9 +41,9 @@ def test(data, # model = nn.DataParallel(model) # 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: - model.half() # to FP16 + model.half() # Configure model.eval()