mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 20:02:49 +08:00
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
This commit is contained in:
parent
75432a0695
commit
fa44a05567
@ -1046,7 +1046,7 @@ Renderer::backward(
|
|||||||
at::optional<torch::Tensor>,
|
at::optional<torch::Tensor>,
|
||||||
at::optional<torch::Tensor>>
|
at::optional<torch::Tensor>>
|
||||||
ret;
|
ret;
|
||||||
if (mode == 1 || (!dif_pos && !dif_col && !dif_rad && !dif_cam)) {
|
if (mode == 1 || (!dif_pos && !dif_col && !dif_rad && !dif_cam && !dif_opy)) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
// Create the camera information.
|
// Create the camera information.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user