提交 0afbb8d4 authored 作者: Glenn Jocher's avatar Glenn Jocher

update test.py model.half()

上级 41ff83a9
...@@ -41,9 +41,9 @@ def test(data, ...@@ -41,9 +41,9 @@ def test(data,
# model = nn.DataParallel(model) # model = nn.DataParallel(model)
# Half # 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: if half:
model.half() # to FP16 model.half()
# Configure # Configure
model.eval() model.eval()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论