Skip to content

Commit 8660db9

Browse files
Wanchao Liangfacebook-github-bot
authored andcommitted
Remove some pyre fixmes
Reviewed By: divchenko Differential Revision: D27835360 fbshipit-source-id: cbb23793ee57382e43bd65bd40cfeb2820c6eec2
1 parent 1c45ec9 commit 8660db9

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

pytorch3d/ops/points_to_volumes.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -323,14 +323,13 @@ def splat_points_to_volumes(
323323
rXYZ = points_3d_indices - XYZ.type_as(points_3d) # remainder of floor
324324

325325
# split into separate coordinate vectors
326-
# pyre-fixme[16]: `LongTensor` has no attribute `split`.
327326
X, Y, Z = XYZ.split(1, dim=2)
328327
# rX = remainder after floor = 1-"the weight of each vote into
329328
# the X coordinate of the 8-neighborhood"
330-
# pyre-fixme[16]: `Tensor` has no attribute `split`.
331329
rX, rY, rZ = rXYZ.split(1, dim=2)
332330

333331
# get random indices for the purpose of adding out-of-bounds values
332+
# pyre-fixme[16]: `Tensor` has no attribute `new_zeros`.
334333
rand_idx = X.new_zeros(X.shape).random_(0, n_voxels)
335334

336335
# iterate over the x, y, z indices of the 8-neighborhood (xdiff, ydiff, zdiff)
@@ -348,7 +347,6 @@ def splat_points_to_volumes(
348347
w = wX * wY * wZ
349348

350349
# valid - binary indicators of votes that fall into the volume
351-
# pyre-fixme[16]: `int` has no attribute `long`.
352350
valid = (
353351
(0 <= X_)
354352
* (X_ < grid_sizes_xyz[:, None, 0:1])
@@ -367,8 +365,6 @@ def splat_points_to_volumes(
367365
idx_valid = idx * valid + rand_idx * (1 - valid)
368366
w_valid = w * valid.type_as(w)
369367
if mask is not None:
370-
# pyre-fixme[6]: Expected `_OtherTensor` for 1st param but got
371-
# `int`.
372368
w_valid = w_valid * mask.type_as(w)[:, :, None]
373369

374370
# scatter add casts the votes into the weight accumulator
@@ -378,7 +374,6 @@ def splat_points_to_volumes(
378374

379375
# reshape idx_valid -> (minibatch, feature_dim, n_points)
380376
idx_valid = idx_valid.view(ba, 1, n_points).expand_as(points_features)
381-
# pyre-fixme[16]: `int` has no attribute `view`.
382377
w_valid = w_valid.view(ba, 1, n_points)
383378

384379
# volume_features of shape (minibatch, feature_dim, n_voxels)

pytorch3d/structures/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ def packed_to_list(x: torch.Tensor, split_size: Union[list, int]):
164164
Returns:
165165
x_list: A list of Tensors
166166
"""
167-
# pyre-fixme[16]: `Tensor` has no attribute `split`.
168167
return x.split(split_size, dim=0)
169168

170169

0 commit comments

Comments
 (0)