gaussian-splatting icon indicating copy to clipboard operation
gaussian-splatting copied to clipboard

sometimes, bug: RuntimeError: Function _GaussRasterizerFunctionBackward returned an invalid gradient at index 3 - got [0, 0, 3] but expected shape compatible with [0, 16, 3]

Open yuedajiong opened this issue 2 years ago • 5 comments
trafficstars

error:
RuntimeError: Function _GaussRasterizerFunctionBackward returned an invalid gradient at index 3 - got [0, 0, 3] but expected shape compatible with [0, 16, 3]

why? while optiomization, in loop:

if max_screen_size: big_points_vs OR big_points_ws, especial big_points_ws prune_mask contains all gauss-points: scaling.max > 0.1 * extent so, the points reduce to 'zeor', no data in forward() but still called in backward() in .cu

yuedajiong avatar Nov 15 '23 23:11 yuedajiong

Got the same error here yesterday running on my custom data. Saw your post on refactoring their code. Any idea how to fix it?

Edit: Found the cause, but not on the coding side. More like a "my problem" https://github.com/graphdeco-inria/gaussian-splatting/blob/2eee0e26d2d5fd00ec462df47752223952f6bf4e/train.py#L118-L120

https://github.com/graphdeco-inria/gaussian-splatting/blob/2eee0e26d2d5fd00ec462df47752223952f6bf4e/scene/gaussian_model.py#L396C1-L401

My densification_interval was set way too narrow and cameras_extent was too small that all the points in the world space got pruned away...

ff98li avatar Nov 16 '23 19:11 ff98li

I have known the problem and how to fix/bypass it, just rerun, or adjust the parameters. (yes, adjust the parameters to avoid) I do not focus on to modify the code for a perfect solution.

yuedajiong avatar Nov 17 '23 04:11 yuedajiong

i got same error, how to fix it?

lzghades avatar Nov 27 '23 03:11 lzghades

I have known the problem and how to fix/bypass it, just rerun, or adjust the parameters. (yes, adjust the parameters to avoid) I do not focus on to modify the code for a perfect solution. Hello bro, can you tell me how you adjusted the parameters

520jz avatar Jan 19 '24 12:01 520jz

Got the same error here yesterday running on my custom data. Saw your post on refactoring their code. Any idea how to fix it?

Edit: Found the cause, but not on the coding side. More like a "my problem"

https://github.com/graphdeco-inria/gaussian-splatting/blob/2eee0e26d2d5fd00ec462df47752223952f6bf4e/train.py#L118-L120

https://github.com/graphdeco-inria/gaussian-splatting/blob/2eee0e26d2d5fd00ec462df47752223952f6bf4e/scene/gaussian_model.py#L396C1-L401

My densification_interval was set way too narrow and cameras_extent was too small that all the points in the world space got pruned away...

Hi, Can you share your parameter settings? I mean densification_interval and cameras_extent, I also encountered this difficult problem.

chiehwangs avatar Mar 25 '24 13:03 chiehwangs