Unverified 提交 fd167997 authored 作者: Benjamin Fineran's avatar Benjamin Fineran 提交者: GitHub

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

上级 7cdc5165
......@@ -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()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论