Skip to content
Snippets Groups Projects
Commit 7715f235 authored by Jiangmiao Pang's avatar Jiangmiao Pang Committed by Kai Chen
Browse files

Fix bugs in balanced l1 loss (#790)

* Update Libra R-CNN Benchmark

* fix bug in balanced_l1_loss
parent 7a6306f1
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ import numpy as np ...@@ -2,7 +2,7 @@ import numpy as np
import torch import torch
import torch.nn as nn import torch.nn as nn
from .utils import reduce_loss, weighted_loss from .utils import weighted_loss
from ..registry import LOSSES from ..registry import LOSSES
...@@ -23,8 +23,6 @@ def balanced_l1_loss(pred, ...@@ -23,8 +23,6 @@ def balanced_l1_loss(pred,
(b * diff + 1) * torch.log(b * diff / beta + 1) - alpha * diff, (b * diff + 1) * torch.log(b * diff / beta + 1) - alpha * diff,
gamma * diff + gamma / b - alpha * beta) gamma * diff + gamma / b - alpha * beta)
loss = reduce_loss(loss, reduction)
return loss return loss
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment