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
This commit is contained in:
David Novotny 2022-05-09 03:04:34 -07:00 committed by Facebook GitHub Bot
parent 2c64635daa
commit 5c59841863

View File

@ -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