Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
505b5771
Commit
505b5771
authored
Aug 24, 2022
by
Yanhong Zeng
Committed by
Zaida Zhou
Aug 28, 2022
Browse files
[Fix] cast the type of mask to enable training with amp (#2220)
parent
a0851779
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
mmcv/ops/modulated_deform_conv.py
mmcv/ops/modulated_deform_conv.py
+1
-0
No files found.
mmcv/ops/modulated_deform_conv.py
View file @
505b5771
...
...
@@ -68,6 +68,7 @@ class ModulatedDeformConv2dFunction(Function):
input
=
input
.
type_as
(
offset
)
weight
=
weight
.
type_as
(
input
)
bias
=
bias
.
type_as
(
input
)
# type: ignore
mask
=
mask
.
type_as
(
input
)
ctx
.
save_for_backward
(
input
,
offset
,
mask
,
weight
,
bias
)
output
=
input
.
new_empty
(
ModulatedDeformConv2dFunction
.
_output_size
(
ctx
,
input
,
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