"docs/source/vscode:/vscode.git/clone" did not exist on "45ec21b033ce09f7f14a4d5a1081b6b34c5ee6ce"
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
...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment