Add annotations to vision/fair/pytorch3d

Reviewed By: shannonzhu

Differential Revision: D33970393

fbshipit-source-id: 9b4dfaccfc3793fd37705a923d689cb14c9d26ba
This commit is contained in:
Pyre Bot Jr
2022-02-03 01:45:00 -08:00
committed by Facebook GitHub Bot
parent c2862ff427
commit e9fb6c27e3
21 changed files with 65 additions and 49 deletions

View File

@@ -162,7 +162,7 @@ class AbsorptionOnlyRaymarcher(torch.nn.Module):
return opacities
def _shifted_cumprod(x, shift=1):
def _shifted_cumprod(x, shift: int = 1):
"""
Computes `torch.cumprod(x, dim=-1)` and prepends `shift` number of
ones and removes `shift` trailing elements to/from the last dimension
@@ -177,7 +177,7 @@ def _shifted_cumprod(x, shift=1):
def _check_density_bounds(
rays_densities: torch.Tensor, bounds: Tuple[float, float] = (0.0, 1.0)
):
) -> None:
"""
Checks whether the elements of `rays_densities` range within `bounds`.
If not issues a warning.
@@ -197,7 +197,7 @@ def _check_raymarcher_inputs(
features_can_be_none: bool = False,
z_can_be_none: bool = False,
density_1d: bool = True,
):
) -> None:
"""
Checks the validity of the inputs to raymarching algorithms.
"""