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
21143568
Unverified
Commit
21143568
authored
Sep 18, 2020
by
ychan
Committed by
GitHub
Sep 18, 2020
Browse files
fix dcon forward and backward bug (#565)
parent
b7af0e9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
mmcv/ops/csrc/parrots/deform_conv_cuda.cu
mmcv/ops/csrc/parrots/deform_conv_cuda.cu
+2
-0
mmcv/ops/csrc/pytorch/deform_conv_cuda.cu
mmcv/ops/csrc/pytorch/deform_conv_cuda.cu
+3
-0
No files found.
mmcv/ops/csrc/parrots/deform_conv_cuda.cu
View file @
21143568
...
@@ -268,6 +268,7 @@ void DeformConvForwardCUDAKernelLauncher(
...
@@ -268,6 +268,7 @@ void DeformConvForwardCUDAKernelLauncher(
gemm
(
ctx
,
1
,
false
,
weight_g
,
false
,
columns_g
,
1
,
output_g
);
gemm
(
ctx
,
1
,
false
,
weight_g
,
false
,
columns_g
,
1
,
output_g
);
}
}
columns
=
columns
.
view
({
columns
.
dim
(
0
)
*
columns
.
dim
(
1
),
columns
.
dim
(
2
)});
columns
=
columns
.
view
({
columns
.
dim
(
0
)
*
columns
.
dim
(
1
),
columns
.
dim
(
2
)});
weight
=
weight
.
view
({
nOutputPlane
,
nInputPlane
,
kH
,
kW
});
}
}
output_buffer
=
output_buffer
.
view
(
output_buffer
=
output_buffer
.
view
(
...
@@ -372,6 +373,7 @@ void DeformConvBackwardInputCUDAKernelLauncher(
...
@@ -372,6 +373,7 @@ void DeformConvBackwardInputCUDAKernelLauncher(
gradOutput
=
gradOutput
.
view
({
gradOutput
.
dim
(
0
),
gradOutput
=
gradOutput
.
view
({
gradOutput
.
dim
(
0
),
gradOutput
.
dim
(
1
)
*
gradOutput
.
dim
(
2
),
gradOutput
.
dim
(
1
)
*
gradOutput
.
dim
(
2
),
im2col_step
,
outputHeight
,
outputWidth
});
im2col_step
,
outputHeight
,
outputWidth
});
weight
=
weight
.
view
({
nOutputPlane
,
nInputPlane
,
kH
,
kW
});
deformable_col2im_coord
(
columns
,
input
[
elt
],
offset
[
elt
],
nInputPlane
,
deformable_col2im_coord
(
columns
,
input
[
elt
],
offset
[
elt
],
nInputPlane
,
inputHeight
,
inputWidth
,
kH
,
kW
,
padH
,
padW
,
dH
,
dW
,
inputHeight
,
inputWidth
,
kH
,
kW
,
padH
,
padW
,
dH
,
dW
,
...
...
mmcv/ops/csrc/pytorch/deform_conv_cuda.cu
View file @
21143568
...
@@ -278,6 +278,8 @@ void DeformConvForwardCUDAKernelLauncher(Tensor input, Tensor weight,
...
@@ -278,6 +278,8 @@ void DeformConvForwardCUDAKernelLauncher(Tensor input, Tensor weight,
}
}
columns
=
columns
=
columns
.
view
({
columns
.
size
(
0
)
*
columns
.
size
(
1
),
columns
.
size
(
2
)});
columns
.
view
({
columns
.
size
(
0
)
*
columns
.
size
(
1
),
columns
.
size
(
2
)});
weight
=
weight
.
view
({
weight
.
size
(
0
)
*
weight
.
size
(
1
),
weight
.
size
(
2
),
weight
.
size
(
3
),
weight
.
size
(
4
)});
}
}
output_buffer
=
output_buffer
.
view
(
output_buffer
=
output_buffer
.
view
(
...
@@ -375,6 +377,7 @@ void DeformConvBackwardInputCUDAKernelLauncher(
...
@@ -375,6 +377,7 @@ void DeformConvBackwardInputCUDAKernelLauncher(
gradOutput
=
gradOutput
.
view
(
gradOutput
=
gradOutput
.
view
(
{
gradOutput
.
size
(
0
),
gradOutput
.
size
(
1
)
*
gradOutput
.
size
(
2
),
{
gradOutput
.
size
(
0
),
gradOutput
.
size
(
1
)
*
gradOutput
.
size
(
2
),
gradOutput
.
size
(
3
),
gradOutput
.
size
(
4
),
gradOutput
.
size
(
5
)});
gradOutput
.
size
(
3
),
gradOutput
.
size
(
4
),
gradOutput
.
size
(
5
)});
weight
=
weight
.
view
({
nOutputPlane
,
nInputPlane
,
kH
,
kW
});
deformable_col2im_coord
(
columns
,
input
[
elt
],
offset
[
elt
],
nInputPlane
,
deformable_col2im_coord
(
columns
,
input
[
elt
],
offset
[
elt
],
nInputPlane
,
inputHeight
,
inputWidth
,
kH
,
kW
,
padH
,
padW
,
dH
,
dW
,
inputHeight
,
inputWidth
,
kH
,
kW
,
padH
,
padW
,
dH
,
dW
,
...
...
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