"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "9754c6d9d8204d4b05cf3d15315396fd446eabd8"
Commit 09c17629 authored by generatedunixname89002005307016's avatar generatedunixname89002005307016 Committed by Facebook GitHub Bot
Browse files

suppress errors in `vision/fair/pytorch3d`

Differential Revision: D22519468

fbshipit-source-id: 6e39c2e50ef95f37df407dbc6d186cc97832fc7d
parent 26d2cc24
...@@ -52,6 +52,7 @@ def interpolate_face_attributes( ...@@ -52,6 +52,7 @@ def interpolate_face_attributes(
pix_to_face = pix_to_face.view(-1) pix_to_face = pix_to_face.view(-1)
barycentric_coords = barycentric_coords.view(N * H * W * K, 3) barycentric_coords = barycentric_coords.view(N * H * W * K, 3)
args = (pix_to_face, barycentric_coords, face_attributes) args = (pix_to_face, barycentric_coords, face_attributes)
# pyre-fixme[16]: `_InterpFaceAttrs` has no attribute `apply`.
out = _InterpFaceAttrs.apply(*args) out = _InterpFaceAttrs.apply(*args)
out = out.view(N, H, W, K, -1) out = out.view(N, H, W, K, -1)
return out return out
...@@ -89,6 +90,7 @@ def interpolate_face_attributes_python( ...@@ -89,6 +90,7 @@ def interpolate_face_attributes_python(
pix_to_face = pix_to_face.clone() pix_to_face = pix_to_face.clone()
pix_to_face[mask] = 0 pix_to_face[mask] = 0
idx = pix_to_face.view(N * H * W * K, 1, 1).expand(N * H * W * K, 3, D) idx = pix_to_face.view(N * H * W * K, 1, 1).expand(N * H * W * K, 3, D)
# pyre-fixme[16]: `Tensor` has no attribute `gather`.
pixel_face_vals = face_attributes.gather(0, idx).view(N, H, W, K, 3, D) pixel_face_vals = face_attributes.gather(0, idx).view(N, H, W, K, 3, D)
pixel_vals = (barycentric_coords[..., None] * pixel_face_vals).sum(dim=-2) pixel_vals = (barycentric_coords[..., None] * pixel_face_vals).sum(dim=-2)
pixel_vals[mask] = 0 # Replace masked values in output. pixel_vals[mask] = 0 # Replace masked values in output.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment