提交 72d06147 authored 作者: Glenn Jocher's avatar Glenn Jocher

Multi-GPU disabled in test.py

上级 bafbc65e
import argparse import argparse
import json import json
import yaml
from torch.utils.data import DataLoader from torch.utils.data import DataLoader
from utils.datasets import * from utils.datasets import *
...@@ -40,8 +39,9 @@ def test(data, ...@@ -40,8 +39,9 @@ def test(data,
if half: if half:
model.half() # to FP16 model.half() # to FP16
if device.type != 'cpu' and torch.cuda.device_count() > 1: # Multi-GPU disabled, incompatible with .half()
model = nn.DataParallel(model) # if device.type != 'cpu' and torch.cuda.device_count() > 1:
# model = nn.DataParallel(model)
else: # called by train.py else: # called by train.py
training = True training = True
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论