Kai-46 / ARF-svox2

Artistic Radiance Fields
BSD 2-Clause "Simplified" License
510 stars 42 forks source link

Can the proposed deferred back-propagation be accomplished by Pytorch #11

Closed chobao closed 1 year ago

chobao commented 1 year ago

Hi, Kai-46, thanks for the impressive work! The proposed Deferred back-propagation method can render a full-resolution image in one batch. However, the back-propagation of the released code is implemented by the CUDA. Is it possible to accomplish it by Pytorch?

Kai-46 commented 1 year ago

Yes, you could reference our ARF-TensoRF implementation which are purely in python: Google drive

chobao commented 1 year ago

Wow, Thanks for sharing the code! I read the amazing code and the answer is clear. However, there is one thing confusing. In train_style.py(line [249-333]()), the optimization seems to miss the optimizer.zero_grad() before rgb_pred.backward(rgb_pred_grad). Please let me know if I misunderstand it.

Kai-46 commented 1 year ago

That seems to be the case; you could add it to line 294 of train_style.py.

chobao commented 1 year ago

Thanks, it helps a lot!