From 5c59841863a51e91fb2dc7a3e6bc5e02738388a8 Mon Sep 17 00:00:00 2001 From: David Novotny Date: Mon, 9 May 2022 03:04:34 -0700 Subject: [PATCH] Add **kwargs to ViewMetrics.forward Summary: GenericModel crashes in case the `aux` field of any Renderer is populated. This is because the `rendered.aux` is unpacked to ViewMetrics.forward whose signature does not contain **kwargs. Hence, the contents of `aux` are unknown to forward's signature resulting in a crash. Reviewed By: bottler Differential Revision: D36166118 fbshipit-source-id: 906a067ea02a3648a69667422466451bc219ebf6 --- pytorch3d/implicitron/models/metrics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pytorch3d/implicitron/models/metrics.py b/pytorch3d/implicitron/models/metrics.py index b9493f2f..527bc4b4 100644 --- a/pytorch3d/implicitron/models/metrics.py +++ b/pytorch3d/implicitron/models/metrics.py @@ -28,6 +28,7 @@ class ViewMetrics(torch.nn.Module): density_grid: Optional[torch.Tensor] = None, keys_prefix: str = "loss_", mask_renders_by_pred: bool = False, + **kwargs, ) -> Dict[str, torch.Tensor]: """ Calculates various differentiable metrics useful for supervising