瀏覽代碼

update test.py model.half()

5.0
Glenn Jocher 4 年之前
父節點
當前提交
0afbb8d498
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      test.py

+ 2
- 2
test.py 查看文件

@@ -41,9 +41,9 @@ def test(data,
# model = nn.DataParallel(model)

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

# Configure
model.eval()

Loading…
取消
儲存