Skip to content

Commit f72edab

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

File tree

4 files changed

+7
-35
lines changed

4 files changed

+7
-35
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

+5-6
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,6 @@ def forward(self,
272272
queries=out_positions,
273273
radius=radius,
274274
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
281275

282276
elif len(extents.shape) == 1:
283277
radii = 0.5 * extents
@@ -291,6 +285,11 @@ def forward(self,
291285
if self.window_function is None:
292286
neighbors_importance = paddle.empty((0,), dtype=paddle.float32)
293287
else:
288+
if self.radius_search_metric == 'L2':
289+
neighbors_distance_normalized = self.nns.neighbors_distance / (
290+
radius * radius)
291+
else: # L1
292+
neighbors_distance_normalized = self.nns.neighbors_distance / radius
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)