Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
SOLOv2-pytorch
Commits
a2079427
Commit
a2079427
authored
Nov 26, 2018
by
Kai Chen
Browse files
bug fix
parent
13dec7ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
mmdet/core/loss/losses.py
mmdet/core/loss/losses.py
+1
-1
No files found.
mmdet/core/loss/losses.py
View file @
a2079427
...
...
@@ -31,7 +31,7 @@ def sigmoid_focal_loss(pred,
gamma
=
2.0
,
alpha
=
0.25
,
reduction
=
'elementwise_mean'
):
pred_sigmoid
=
pred
.
sigmoid
()
.
detach
()
pred_sigmoid
=
pred
.
sigmoid
()
pt
=
(
1
-
pred_sigmoid
)
*
target
+
pred_sigmoid
*
(
1
-
target
)
weight
=
(
alpha
*
target
+
(
1
-
alpha
)
*
(
1
-
target
))
*
weight
weight
=
weight
*
pt
.
pow
(
gamma
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment