未验证 提交 d41adb55 编写于 作者: B Bubbliiiing 提交者: GitHub

Update yolo.py

上级 de1b909d
......@@ -57,7 +57,7 @@ class YOLO(object):
# 加快模型训练的效率
print('Loading weights into state dict...')
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
state_dict = torch.load(self.model_path, map_location=device
state_dict = torch.load(self.model_path, map_location=device)
self.net.load_state_dict(state_dict)
self.net = self.net.eval()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册