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
OpenDAS
MMCV
Commits
961373ad
Unverified
Commit
961373ad
authored
Aug 24, 2022
by
Yanhong Zeng
Committed by
GitHub
Aug 24, 2022
Browse files
[Fix] cast the type of mask to enable training with amp (#2220)
parent
c3835415
Changes
1
Hide 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 @
961373ad
...
@@ -69,6 +69,7 @@ class ModulatedDeformConv2dFunction(Function):
...
@@ -69,6 +69,7 @@ class ModulatedDeformConv2dFunction(Function):
input
=
input
.
type_as
(
offset
)
input
=
input
.
type_as
(
offset
)
weight
=
weight
.
type_as
(
input
)
weight
=
weight
.
type_as
(
input
)
bias
=
bias
.
type_as
(
input
)
# type: ignore
bias
=
bias
.
type_as
(
input
)
# type: ignore
mask
=
mask
.
type_as
(
input
)
ctx
.
save_for_backward
(
input
,
offset
,
mask
,
weight
,
bias
)
ctx
.
save_for_backward
(
input
,
offset
,
mask
,
weight
,
bias
)
output
=
input
.
new_empty
(
output
=
input
.
new_empty
(
ModulatedDeformConv2dFunction
.
_output_size
(
ctx
,
input
,
weight
))
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