Skip to content

Commit

Permalink
Correct shape for default grid_sizes
Browse files Browse the repository at this point in the history
Summary: Small fix for omitting this argument.

Reviewed By: nikhilaravi

Differential Revision: D29548610

fbshipit-source-id: f25032fab3faa2f09006f5fcf8628138555f2f20
  • Loading branch information
bottler authored and facebook-github-bot committed Aug 17, 2021
1 parent 46cf197 commit b481cfb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pytorch3d/ops/points_to_volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@ def add_points_features_to_volume_densities_features(

# init the volumetric grid sizes if uninitialized
if grid_sizes is None:
grid_sizes = torch.LongTensor(list(volume_densities.shape[2:])).to(
volume_densities
# grid sizes shape (minibatch, 3)
grid_sizes = (
torch.LongTensor(list(volume_densities.shape[2:]))
.to(volume_densities)
.expand(volume_densities.shape[0], 3)
)

# flatten densities and features
Expand Down

0 comments on commit b481cfb

Please sign in to comment.