From 154ace4ba45986f61203d6cd4fb61da28f8c8e95 Mon Sep 17 00:00:00 2001 From: Christoph Lassner Date: Tue, 19 Jan 2021 19:25:29 -0800 Subject: [PATCH] Fix #501. Summary: Gradient calculation flags were not properly routed through the Python interface. This diff fixes this. In particular, gradients for focal length (only if no other camera gradients were calculated) and opacity were not calculated as required. Reviewed By: gkioxari Differential Revision: D25921202 fbshipit-source-id: 22cbae3bda886d81bb95878f0be45c2ddd29934c --- pytorch3d/renderer/points/pulsar/renderer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pytorch3d/renderer/points/pulsar/renderer.py b/pytorch3d/renderer/points/pulsar/renderer.py index ea2ce819..34b2a5e4 100644 --- a/pytorch3d/renderer/points/pulsar/renderer.py +++ b/pytorch3d/renderer/points/pulsar/renderer.py @@ -238,8 +238,9 @@ class _Render(torch.autograd.Function): ctx.needs_input_grad[3] or ctx.needs_input_grad[4] or ctx.needs_input_grad[5] - or ctx.needs_input_grad[6], - ctx.needs_input_grad[13], + or ctx.needs_input_grad[6] + or ctx.needs_input_grad[7], + ctx.needs_input_grad[14], None, # No debug information provided. ) else: