kwea123 / nerf_pl

NeRF (Neural Radiance Fields) and NeRF in the Wild using pytorch-lightning
https://www.youtube.com/playlist?list=PLDV2CyUo4q-K02pNEyDr7DYpTQuka3mbV
MIT License
2.74k stars 483 forks source link

Why does setattr(self, f"xyz_encoding_{i+1}", layer) #164

Closed TwiceMao closed 2 years ago

TwiceMao commented 2 years ago

As what is described in the title, I'm confused by the code : setattr(self, f"xyzencoding{i+1}", layer) in the 69th line of ./models/nerf.py.

What does xyzencoding{i+1} mean? And why do you use it there? It's not an attribute of the Class Nerf. Thank you for your reply.

TwiceMao commented 2 years ago

I have solved it, thank you.