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
OpenPCDet
Commits
f561b8ae
Commit
f561b8ae
authored
Jul 28, 2020
by
Shaoshuai Shi
Browse files
bugfixed: backward bug in ThreeInterpolate of stacked version pointnet2
parent
3b2bcdaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
pcdet/ops/pointnet2/pointnet2_stack/src/interpolate.cpp
pcdet/ops/pointnet2/pointnet2_stack/src/interpolate.cpp
+1
-0
pcdet/ops/pointnet2/pointnet2_stack/src/interpolate_gpu.cu
pcdet/ops/pointnet2/pointnet2_stack/src/interpolate_gpu.cu
+5
-3
No files found.
pcdet/ops/pointnet2/pointnet2_stack/src/interpolate.cpp
View file @
f561b8ae
...
@@ -77,5 +77,6 @@ void three_interpolate_grad_wrapper_stack(at::Tensor grad_out_tensor, at::Tensor
...
@@ -77,5 +77,6 @@ void three_interpolate_grad_wrapper_stack(at::Tensor grad_out_tensor, at::Tensor
const
int
*
idx
=
idx_tensor
.
data
<
int
>
();
const
int
*
idx
=
idx_tensor
.
data
<
int
>
();
float
*
grad_features
=
grad_features_tensor
.
data
<
float
>
();
float
*
grad_features
=
grad_features_tensor
.
data
<
float
>
();
// printf("N=%d, channels=%d\n", N, channels);
three_interpolate_grad_kernel_launcher_stack
(
N
,
channels
,
grad_out
,
idx
,
weight
,
grad_features
);
three_interpolate_grad_kernel_launcher_stack
(
N
,
channels
,
grad_out
,
idx
,
weight
,
grad_features
);
}
}
\ No newline at end of file
pcdet/ops/pointnet2/pointnet2_stack/src/interpolate_gpu.cu
View file @
f561b8ae
...
@@ -164,9 +164,11 @@ __global__ void three_interpolate_grad_kernel_stack(int N, int channels, const f
...
@@ -164,9 +164,11 @@ __global__ void three_interpolate_grad_kernel_stack(int N, int channels, const f
weight
+=
pt_idx
*
3
;
weight
+=
pt_idx
*
3
;
idx
+=
pt_idx
*
3
;
idx
+=
pt_idx
*
3
;
atomicAdd
(
grad_features
+
idx
[
0
],
grad_out
[
0
]
*
weight
[
0
]);
// printf("pt_idx=%d, c_idx=%d, idx=(%d, %d, %d), grad_out=%f\n", pt_idx, c_idx, idx[0], idx[1], idx[2], grad_out[0]);
atomicAdd
(
grad_features
+
idx
[
1
],
grad_out
[
0
]
*
weight
[
1
]);
atomicAdd
(
grad_features
+
idx
[
2
],
grad_out
[
0
]
*
weight
[
2
]);
atomicAdd
(
grad_features
+
idx
[
0
]
*
channels
+
c_idx
,
grad_out
[
0
]
*
weight
[
0
]);
atomicAdd
(
grad_features
+
idx
[
1
]
*
channels
+
c_idx
,
grad_out
[
0
]
*
weight
[
1
]);
atomicAdd
(
grad_features
+
idx
[
2
]
*
channels
+
c_idx
,
grad_out
[
0
]
*
weight
[
2
]);
}
}
...
...
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