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
6668bf03
Commit
6668bf03
authored
Oct 14, 2019
by
Zhuliang Yao
Committed by
Kai Chen
Oct 14, 2019
Browse files
fix a scale bug according to Non-Local papaer (#1528)
parent
0527e210
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
mmdet/models/plugins/non_local.py
mmdet/models/plugins/non_local.py
+1
-1
No files found.
mmdet/models/plugins/non_local.py
View file @
6668bf03
...
...
@@ -76,7 +76,7 @@ class NonLocal2D(nn.Module):
pairwise_weight
=
torch
.
matmul
(
theta_x
,
phi_x
)
if
self
.
use_scale
:
# theta_x.shape[-1] is `self.inter_channels`
pairwise_weight
/=
theta_x
.
shape
[
-
1
]
**
-
0.5
pairwise_weight
/=
theta_x
.
shape
[
-
1
]
**
0.5
pairwise_weight
=
pairwise_weight
.
softmax
(
dim
=-
1
)
return
pairwise_weight
...
...
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