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

Update yolo_training.py

上级 27cb95f1
...@@ -194,7 +194,7 @@ class YOLOLoss(nn.Module): ...@@ -194,7 +194,7 @@ class YOLOLoss(nn.Module):
num_pos = torch.sum(mask) num_pos = torch.sum(mask)
num_pos = torch.max(num_pos, torch.ones_like(num_pos)) num_pos = torch.max(num_pos, torch.ones_like(num_pos))
else: else:
num_pos = bs num_pos = bs/3
return loss, num_pos return loss, num_pos
def get_target(self, target, anchors, in_w, in_h, ignore_threshold): def get_target(self, target, anchors, in_w, in_h, ignore_threshold):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册