It seems that the viewmatrix (w2c) in GaussianRasterizationSettings is not differentiable. When traversing through grad_fn.next_functions.
# l1 + dssim
loss.backward()
grad_fn = loss.grad_fn
while grad_fn is not None:
print(grad_fn)
grad_fn = grad_fn.next_functions[0][0]
output:
<AddBackward0 object at 0x7f97e9d962b0>
<AddBackward0 object at 0x7f97e9d96310>
<MulBackward0 object at 0x7f97e9d962b0>
<MeanBackward0 object at 0x7f97e9d96310>
<AbsBackward0 object at 0x7f97e9d962b0>
<SubBackward0 object at 0x7f97e9d96310>
<MaskedSelectBackward0 object at 0x7f97e9d962b0>
<torch.autograd.function._RasterizeGaussiansBackward object at 0x7f97e9d7c140>
<AccumulateGrad object at 0x7f97e9d962b0>
I couldn't find the gradient function for viewmatrix. Do I need to edit the backward function of GaussianRasterization to compute the gradient of the camera view? Are there any other methods available? Thanks.
It seems that the viewmatrix (w2c) in GaussianRasterizationSettings is not differentiable. When traversing through grad_fn.next_functions.
output:
I couldn't find the gradient function for viewmatrix. Do I need to edit the backward function of GaussianRasterization to compute the gradient of the camera view? Are there any other methods available? Thanks.