瀏覽代碼

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 年之前
父節點
當前提交
fd1679975b
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      test.py

+ 2
- 1
test.py 查看文件

@@ -37,6 +37,7 @@ def test(data,
plots=True,
wandb_logger=None,
compute_loss=None,
half_precision=True,
is_coco=False):
# Initialize/load model and set device
training = model is not None
@@ -61,7 +62,7 @@ def test(data,
# model = nn.DataParallel(model)

# 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:
model.half()


Loading…
取消
儲存