train with multi-gpu half test bug fix #99
This commit is contained in:
parent
d1e5716610
commit
2daa412575
3
test.py
3
test.py
|
|
@ -46,7 +46,8 @@ def test(data,
|
||||||
else: # called by train.py
|
else: # called by train.py
|
||||||
training = True
|
training = True
|
||||||
device = next(model.parameters()).device # get model device
|
device = next(model.parameters()).device # get model device
|
||||||
half = device.type != 'cpu' and torch.cuda.device_count() == 1 # half precision only supported on single-GPU
|
# half disabled https://github.com/ultralytics/yolov5/issues/99
|
||||||
|
half = False # device.type != 'cpu' and torch.cuda.device_count() == 1
|
||||||
if half:
|
if half:
|
||||||
model.half() # to FP16
|
model.half() # to FP16
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue