NeUDF icon indicating copy to clipboard operation
NeUDF copied to clipboard

Training Code Issues

Open G-1nOnly opened this issue 2 years ago • 5 comments

Congratulations and thanks for such a great work! I found that for the DTU dataset (probably other datasets as well?), the norm of normals may be 0 when calculating the normal error for supervising, which causes the code stop running, so I add the following line: norm = torch.where(torch.eq(norm,0.0), torch.tensor(1.), norm) in the render_core function in ./models/renderer.py to prevent from such issues and the code works now. But I'm not sure that the modification of code is correct, so I just raise this issue.

G-1nOnly avatar May 13 '23 10:05 G-1nOnly

Hello, I also met the similar "Division by zero" error. I just add the small number (1e-5) to avoid it.

Bests, Runsong

Runsong123 avatar Jun 22 '23 05:06 Runsong123

Good to know !

G-1nOnly avatar Jun 22 '23 07:06 G-1nOnly

Hi @G-1nOnly @G-1nOnly, sorry for the late reply. The normal loss can be just set to 0. It is just a naive attempt to smooth the output mesh for visual pleasure, and it tends out to be unnecessary. Hi @baekhyun77, I didn't reproduce this error. I guess it is the issue of cuda device, likely some tensors on cpu and some on gpu. Could you please try specify like --gpu 0 in your command line, and see if it may help.

Lagwein avatar Jun 29 '23 09:06 Lagwein

Thank you very much for your answer. I have noticed that it may be normal_ Loss encountered a situation with a value of NaN.

baekhyun77 avatar Jun 29 '23 09:06 baekhyun77

Thanks for the reply! Okay, setting the loss to be 0 works definitely and thanks for the clarification.

G-1nOnly avatar Jun 29 '23 10:06 G-1nOnly