Skip to content

Commit 573a42c

Browse files
generatedunixname89002005307016facebook-github-bot
generatedunixname89002005307016
authored andcommitted
suppress errors in vision/fair/pytorch3d
Differential Revision: D46685078 fbshipit-source-id: daf2e75f24b68d2eab74cddca8ab9446e96951e7
1 parent 928efdd commit 573a42c

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

pytorch3d/ops/laplacian_matrices.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def laplacian(verts: torch.Tensor, edges: torch.Tensor) -> torch.Tensor:
4545
# i.e. A[i, j] = 1 if (i,j) is an edge, or
4646
# A[e0, e1] = 1 & A[e1, e0] = 1
4747
ones = torch.ones(idx.shape[1], dtype=torch.float32, device=verts.device)
48-
# pyre-fixme[16]: Module `sparse` has no attribute `FloatTensor`.
4948
A = torch.sparse.FloatTensor(idx, ones, (V, V))
5049

5150
# the sum of i-th row of A gives the degree of the i-th vertex
@@ -60,14 +59,12 @@ def laplacian(verts: torch.Tensor, edges: torch.Tensor) -> torch.Tensor:
6059
# pyre-fixme[58]: `/` is not supported for operand types `float` and `Tensor`.
6160
deg1 = torch.where(deg1 > 0.0, 1.0 / deg1, deg1)
6261
val = torch.cat([deg0, deg1])
63-
# pyre-fixme[16]: Module `sparse` has no attribute `FloatTensor`.
6462
L = torch.sparse.FloatTensor(idx, val, (V, V))
6563

6664
# Then we add the diagonal values L[i, i] = -1.
6765
idx = torch.arange(V, device=verts.device)
6866
idx = torch.stack([idx, idx], dim=0)
6967
ones = torch.ones(idx.shape[1], dtype=torch.float32, device=verts.device)
70-
# pyre-fixme[16]: Module `sparse` has no attribute `FloatTensor`.
7168
L -= torch.sparse.FloatTensor(idx, ones, (V, V))
7269

7370
return L
@@ -124,7 +121,6 @@ def cot_laplacian(
124121
ii = faces[:, [1, 2, 0]]
125122
jj = faces[:, [2, 0, 1]]
126123
idx = torch.stack([ii, jj], dim=0).view(2, F * 3)
127-
# pyre-fixme[16]: Module `sparse` has no attribute `FloatTensor`.
128124
L = torch.sparse.FloatTensor(idx, cot.view(-1), (V, V))
129125

130126
# Make it symmetric; this means we are also setting
@@ -173,7 +169,6 @@ def norm_laplacian(
173169
e01 = edges.t() # (2, E)
174170

175171
V = verts.shape[0]
176-
# pyre-fixme[16]: Module `sparse` has no attribute `FloatTensor`.
177172
L = torch.sparse.FloatTensor(e01, w01, (V, V))
178173
L = L + L.t()
179174

pytorch3d/renderer/cameras.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,7 @@ def __getitem__(
401401
kwargs = {}
402402

403403
tensor_types = {
404-
# pyre-fixme[16]: Module `cuda` has no attribute `BoolTensor`.
405404
"bool": (torch.BoolTensor, torch.cuda.BoolTensor),
406-
# pyre-fixme[16]: Module `cuda` has no attribute `LongTensor`.
407405
"long": (torch.LongTensor, torch.cuda.LongTensor),
408406
}
409407
if not isinstance(

0 commit comments

Comments
 (0)