Skip to content

Commit fa44a05

Browse files
classnerfacebook-github-bot
authored andcommitted
Fixing a bug that prevents opacity gradient calculation if no other gradients are required.
Summary: An early-return test for gradient calculation did not include the opacity gradient calculation - hence would also return early without calculating gradients even if opacity gradients are required. Reviewed By: bottler Differential Revision: D29505684 fbshipit-source-id: 575e820b8f58b19476b2fe3288702806733e840b
1 parent 75432a0 commit fa44a05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch3d/csrc/pulsar/pytorch/renderer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ Renderer::backward(
10461046
at::optional<torch::Tensor>,
10471047
at::optional<torch::Tensor>>
10481048
ret;
1049-
if (mode == 1 || (!dif_pos && !dif_col && !dif_rad && !dif_cam)) {
1049+
if (mode == 1 || (!dif_pos && !dif_col && !dif_rad && !dif_cam && !dif_opy)) {
10501050
return ret;
10511051
}
10521052
// Create the camera information.

0 commit comments

Comments
 (0)