We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if G == 0: # 所有图片都没有gt时 obj_targets = torch.zeros((N, A, 1), dtype=torch.float32, device=obj_preds.device) num_fg = 1 # 所有图片都没有gt时,设为1 loss_obj = self.bcewithlog_loss(obj_preds, obj_targets) loss_obj = loss_obj.sum() / num_fg losses = { "loss_obj": loss_obj, } return losses yolox_head_fast.py中的这一段是不是错了 这个losses和下面的对不上 return ( loss, reg_weight * loss_iou, loss_obj, loss_cls, loss_l1, num_fg / max(num_gts, 1), )
if G == 0: # 所有图片都没有gt时 obj_targets = torch.zeros((N, A, 1), dtype=torch.float32, device=obj_preds.device) num_fg = 1 # 所有图片都没有gt时,设为1 loss_obj = self.bcewithlog_loss(obj_preds, obj_targets) loss_obj = loss_obj.sum() / num_fg losses = { "loss_obj": loss_obj, } return losses
return ( loss, reg_weight * loss_iou, loss_obj, loss_cls, loss_l1, num_fg / max(num_gts, 1), )
The text was updated successfully, but these errors were encountered:
No branches or pull requests
if G == 0: # 所有图片都没有gt时 obj_targets = torch.zeros((N, A, 1), dtype=torch.float32, device=obj_preds.device) num_fg = 1 # 所有图片都没有gt时,设为1 loss_obj = self.bcewithlog_loss(obj_preds, obj_targets) loss_obj = loss_obj.sum() / num_fg losses = { "loss_obj": loss_obj, } return losses
yolox_head_fast.py中的这一段是不是错了
这个losses和下面的对不上
return ( loss, reg_weight * loss_iou, loss_obj, loss_cls, loss_l1, num_fg / max(num_gts, 1), )
The text was updated successfully, but these errors were encountered: