Skip to content

Commit 46ee00f

Browse files
committed
[fix]pass code style check
1 parent caa6d8c commit 46ee00f

File tree

4 files changed

+8
-36
lines changed

4 files changed

+8
-36
lines changed

cpp/open3d/ml/paddle/misc/VoxelPoolingOpKernel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace {
1616
template <class TReal, class TFeat>
1717
class OutputAllocator {
1818
public:
19-
OutputAllocator(paddle::Place place) : place(place) {}
19+
explicit OutputAllocator(paddle::Place place) : place(place) {}
2020

2121
void AllocPooledPositions(TReal** ptr, size_t num) {
2222
if (num != 0) {

python/open3d/ml/paddle/python/layers/convolutions.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ def forward(self,
251251
inp_importance = paddle.empty(
252252
(0,), dtype=paddle.float32).to(self.kernel.place)
253253

254-
return_distances = not self.window_function is None
255254

256255
if not user_neighbors_index is None and not user_neighbors_row_splits is None:
257256

@@ -272,12 +271,6 @@ def forward(self,
272271
queries=out_positions,
273272
radius=radius,
274273
hash_table=fixed_radius_search_hash_table)
275-
if return_distances:
276-
if self.radius_search_metric == 'L2':
277-
neighbors_distance_normalized = self.nns.neighbors_distance / (
278-
radius * radius)
279-
else: # L1
280-
neighbors_distance_normalized = self.nns.neighbors_distance / radius
281274

282275
elif len(extents.shape) == 1:
283276
radii = 0.5 * extents
@@ -291,6 +284,12 @@ def forward(self,
291284
if self.window_function is None:
292285
neighbors_importance = paddle.empty((0,), dtype=paddle.float32)
293286
else:
287+
if self.radius_search_metric == 'L2':
288+
neighbors_distance_normalized = self.nns.neighbors_distance / (
289+
radius * radius)
290+
else: # L1
291+
neighbors_distance_normalized = self.nns.neighbors_distance / radius
292+
294293
neighbors_importance = self.window_function(
295294
neighbors_distance_normalized)
296295

util/ci_utils.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ install_python_dependencies() {
9696
if [ "$BUILD_PADDLE_OPS" == "ON" ]; then # ML/requirements-torch.txt
9797
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
9898
python -m pip uninstall paddlepaddle paddlepaddle-gpu -y
99-
python -m pip install --pre $PADDLE_GLNX -i $PADDLE_GLNX_PIP_INDEX
99+
python -m pip install --pre "$PADDLE_GLNX" -i "$PADDLE_GLNX_PIP_INDEX"
100100
else
101101
echo "unknown OS $OSTYPE"
102102
exit 1

util/run_python_unittest.sh

-27
This file was deleted.

0 commit comments

Comments
 (0)