Browse Source

add option to disable half precision in test.py (#2507)

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
5.0
Benjamin Fineran GitHub 3 years ago
parent
commit
fd1679975b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      test.py

+ 2
- 1
test.py View File

plots=True, plots=True,
wandb_logger=None, wandb_logger=None,
compute_loss=None, compute_loss=None,
half_precision=True,
is_coco=False): is_coco=False):
# Initialize/load model and set device # Initialize/load model and set device
training = model is not None training = model is not None
# model = nn.DataParallel(model) # model = nn.DataParallel(model)


# Half # Half
half = device.type != 'cpu' # half precision only supported on CUDA
half = device.type != 'cpu' and half_precision # half precision only supported on CUDA
if half: if half:
model.half() model.half()



Loading…
Cancel
Save