google / hypernerf

Code for "HyperNeRF: A Higher-Dimensional Representation for Topologically Varying Neural Radiance Fields".
https://hypernerf.github.io
Apache License 2.0
883 stars 105 forks source link

Problem with Geman-McClure loss implementation #36

Open JokerYan opened 2 years ago

JokerYan commented 2 years ago

I have been testing the Geman-McClure loss implemented in the repo, more specifically the model_utils.general_loss_with_squared_residual() with alpha = -2.

However, the output, as shown below, is very different from my expectation. (alpha = -2, scale = 0.1) image Shouldn't it be like the quadratic shape when |x| < scale

keunhong commented 2 years ago

Did you square the residual before passing it to the function?

JokerYan commented 2 years ago

No, I didn't. I think that is the problem. Thank you very much!