Skip to content

Commit

Permalink
[fix]pass code style check
Browse files Browse the repository at this point in the history
  • Loading branch information
Woodman3 committed Jan 29, 2025
1 parent caa6d8c commit 46ee00f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 36 deletions.
2 changes: 1 addition & 1 deletion cpp/open3d/ml/paddle/misc/VoxelPoolingOpKernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace {
template <class TReal, class TFeat>
class OutputAllocator {
public:
OutputAllocator(paddle::Place place) : place(place) {}
explicit OutputAllocator(paddle::Place place) : place(place) {}

void AllocPooledPositions(TReal** ptr, size_t num) {
if (num != 0) {
Expand Down
13 changes: 6 additions & 7 deletions python/open3d/ml/paddle/python/layers/convolutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ def forward(self,
inp_importance = paddle.empty(
(0,), dtype=paddle.float32).to(self.kernel.place)

return_distances = not self.window_function is None

if not user_neighbors_index is None and not user_neighbors_row_splits is None:

Expand All @@ -272,12 +271,6 @@ def forward(self,
queries=out_positions,
radius=radius,
hash_table=fixed_radius_search_hash_table)
if return_distances:
if self.radius_search_metric == 'L2':
neighbors_distance_normalized = self.nns.neighbors_distance / (
radius * radius)
else: # L1
neighbors_distance_normalized = self.nns.neighbors_distance / radius

elif len(extents.shape) == 1:
radii = 0.5 * extents
Expand All @@ -291,6 +284,12 @@ def forward(self,
if self.window_function is None:
neighbors_importance = paddle.empty((0,), dtype=paddle.float32)
else:
if self.radius_search_metric == 'L2':
neighbors_distance_normalized = self.nns.neighbors_distance / (
radius * radius)
else: # L1
neighbors_distance_normalized = self.nns.neighbors_distance / radius

neighbors_importance = self.window_function(
neighbors_distance_normalized)

Expand Down
2 changes: 1 addition & 1 deletion util/ci_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ install_python_dependencies() {
if [ "$BUILD_PADDLE_OPS" == "ON" ]; then # ML/requirements-torch.txt
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
python -m pip uninstall paddlepaddle paddlepaddle-gpu -y
python -m pip install --pre $PADDLE_GLNX -i $PADDLE_GLNX_PIP_INDEX
python -m pip install --pre "$PADDLE_GLNX" -i "$PADDLE_GLNX_PIP_INDEX"
else
echo "unknown OS $OSTYPE"
exit 1
Expand Down
27 changes: 0 additions & 27 deletions util/run_python_unittest.sh

This file was deleted.

0 comments on commit 46ee00f

Please sign in to comment.