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
dcnv3
Commits
3f2a16d7
Commit
3f2a16d7
authored
Mar 27, 2023
by
Weiyun1025
Committed by
zhe chen
Mar 27, 2023
Browse files
Update tensorrt
parent
d4dc2427
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
segmentation/deploy/demo.png
segmentation/deploy/demo.png
+0
-0
segmentation/ops_dcnv3/functions/dcnv3_func.py
segmentation/ops_dcnv3/functions/dcnv3_func.py
+27
-0
No files found.
segmentation/deploy/demo.png
0 → 100644
View file @
3f2a16d7
301 KB
segmentation/ops_dcnv3/functions/dcnv3_func.py
View file @
3f2a16d7
...
@@ -60,6 +60,33 @@ class DCNv3Function(Function):
...
@@ -60,6 +60,33 @@ class DCNv3Function(Function):
return
grad_input
,
grad_offset
,
grad_mask
,
\
return
grad_input
,
grad_offset
,
grad_mask
,
\
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
@
staticmethod
def
symbolic
(
g
,
input
,
offset
,
mask
,
kernel_h
,
kernel_w
,
stride_h
,
stride_w
,
pad_h
,
pad_w
,
dilation_h
,
dilation_w
,
group
,
group_channels
,
offset_scale
,
im2col_step
):
"""Symbolic function for mmdeploy::DCNv3.
Returns:
DCNv3 op for onnx.
"""
return
g
.
op
(
'mmdeploy::TRTDCNv3'
,
input
,
offset
,
mask
,
kernel_h_i
=
int
(
kernel_h
),
kernel_w_i
=
int
(
kernel_w
),
stride_h_i
=
int
(
stride_h
),
stride_w_i
=
int
(
stride_w
),
pad_h_i
=
int
(
pad_h
),
pad_w_i
=
int
(
pad_w
),
dilation_h_i
=
int
(
dilation_h
),
dilation_w_i
=
int
(
dilation_w
),
group_i
=
int
(
group
),
group_channels_i
=
int
(
group_channels
),
offset_scale_f
=
float
(
offset_scale
),
im2col_step_i
=
int
(
im2col_step
),
)
def
_get_reference_points
(
spatial_shapes
,
device
,
kernel_h
,
kernel_w
,
dilation_h
,
dilation_w
,
pad_h
=
0
,
pad_w
=
0
,
stride_h
=
1
,
stride_w
=
1
):
def
_get_reference_points
(
spatial_shapes
,
device
,
kernel_h
,
kernel_w
,
dilation_h
,
dilation_w
,
pad_h
=
0
,
pad_w
=
0
,
stride_h
=
1
,
stride_w
=
1
):
_
,
H_
,
W_
,
_
=
spatial_shapes
_
,
H_
,
W_
,
_
=
spatial_shapes
...
...
Prev
1
2
Next
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