tiny-cuda-nn icon indicating copy to clipboard operation
tiny-cuda-nn copied to clipboard

how to set init value to HashGrid

Open penguinflys opened this issue 1 year ago • 2 comments

Hallo,

thanks for the excellent work.

I want to set init value to HashGrid, but I don't know how to do it and I have searched the examples and didn't find the solution.

Any help will be appreciated.

penguinflys avatar Aug 04 '23 09:08 penguinflys

If you are in Pytorch, you can just edit the state_dict() I believe.

In C++, you should be able to access the parameters through these functions: https://github.com/NVlabs/tiny-cuda-nn/blob/v1.6/include/tiny-cuda-nn/object.h#L86-L96 Then I guess you can initialize then arbitarily.

The inference_params is simply a copy of params I think based on here: https://github.com/wilsonCernWq/tiny-cuda-nn/blob/master/include/tiny-cuda-nn/trainer.h#L248-L261

wilsonCernWq avatar Aug 09 '23 21:08 wilsonCernWq

Hi, can I ask how you implemented the custom initialization grid parameters?

yizhidecainiao avatar Jan 13 '24 08:01 yizhidecainiao