From a91f15f24e4ea808e476224d7d6b5094b1448491 Mon Sep 17 00:00:00 2001 From: Luca Di Grazia Date: Thu, 11 Aug 2022 08:54:37 -0700 Subject: [PATCH] Incompatible variable type fixed (#1288) Summary: **"filename"**: "projects/nerf/nerf/implicit_function.py" **"warning_type"**: "Incompatible variable type [9]", **"warning_message"**: " input_skips is declared to have type `Tuple[int]` but is used as type `Tuple[]`.", **"warning_line"**: 256, **"fix"**: input_skips: Tuple[int,...] = () Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1288 Reviewed By: kjchalup Differential Revision: D38615188 Pulled By: bottler fbshipit-source-id: a014344dd6cf2125f564f948a3c905ceb84cf994 --- projects/nerf/nerf/implicit_function.py | 4 ++-- projects/nerf/nerf/nerf_renderer.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/nerf/nerf/implicit_function.py b/projects/nerf/nerf/implicit_function.py index ef1278bb..4209e53c 100644 --- a/projects/nerf/nerf/implicit_function.py +++ b/projects/nerf/nerf/implicit_function.py @@ -26,7 +26,7 @@ class NeuralRadianceField(torch.nn.Module): n_hidden_neurons_xyz: int = 256, n_hidden_neurons_dir: int = 128, n_layers_xyz: int = 8, - append_xyz: Tuple[int] = (5,), + append_xyz: Tuple[int, ...] = (5,), use_multiple_streams: bool = True, **kwargs, ): @@ -253,7 +253,7 @@ class MLPWithInputSkips(torch.nn.Module): output_dim: int, skip_dim: int, hidden_dim: int, - input_skips: Tuple[int] = (), + input_skips: Tuple[int, ...] = (), ): """ Args: diff --git a/projects/nerf/nerf/nerf_renderer.py b/projects/nerf/nerf/nerf_renderer.py index 8f84b0ad..d7208973 100644 --- a/projects/nerf/nerf/nerf_renderer.py +++ b/projects/nerf/nerf/nerf_renderer.py @@ -67,7 +67,7 @@ class RadianceFieldRenderer(torch.nn.Module): n_hidden_neurons_xyz: int = 256, n_hidden_neurons_dir: int = 128, n_layers_xyz: int = 8, - append_xyz: Tuple[int] = (5,), + append_xyz: Tuple[int, ...] = (5,), density_noise_std: float = 0.0, visualization: bool = False, ):