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
b4af1c94
Commit
b4af1c94
authored
Dec 12, 2018
by
zehaos
Browse files
Fix index error when class_agnostic is true.
parent
c95c6373
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
mmdet/models/mask_heads/fcn_mask_head.py
mmdet/models/mask_heads/fcn_mask_head.py
+5
-1
No files found.
mmdet/models/mask_heads/fcn_mask_head.py
View file @
b4af1c94
...
@@ -97,6 +97,10 @@ class FCNMaskHead(nn.Module):
...
@@ -97,6 +97,10 @@ class FCNMaskHead(nn.Module):
def
loss
(
self
,
mask_pred
,
mask_targets
,
labels
):
def
loss
(
self
,
mask_pred
,
mask_targets
,
labels
):
loss
=
dict
()
loss
=
dict
()
if
self
.
class_agnostic
:
loss_mask
=
mask_cross_entropy
(
mask_pred
,
mask_targets
,
torch
.
zeros_like
(
labels
))
else
:
loss_mask
=
mask_cross_entropy
(
mask_pred
,
mask_targets
,
labels
)
loss_mask
=
mask_cross_entropy
(
mask_pred
,
mask_targets
,
labels
)
loss
[
'loss_mask'
]
=
loss_mask
loss
[
'loss_mask'
]
=
loss_mask
return
loss
return
loss
...
...
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