mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 06:49:13 +08:00
refactoring configs; pulled network out of graph; created trainer heirarchy (#51)
* changed config graph structure * removed network udner graphs; added new heirarchy trainer * fixed callback in occupancy graph * lint * changed register callback to setter method
This commit is contained in:
1 parent
41073540c1
commit
91ef54963c
19 files changed
+163
-134
No files matched your search
@@ -33,6 +33,7 @@ from pyrad.graphs.modules.ray_sampler import PDFSampler, UniformSampler
|
||||
from pyrad.utils import colors
|
||||
from pyrad.cameras.rays import RayBundle
|
||||
from pyrad.utils import visualization, writer
|
||||
from pyrad.utils.callbacks import Callback
|
||||
|
||||
|
||||
class NGPGraph(Graph):
|
||||
@@ -45,6 +46,16 @@ class NGPGraph(Graph):
|
||||
self.field = None
|
||||
super().__init__(intrinsics=intrinsics, camera_to_world=camera_to_world, **kwargs)
|
||||
|
||||
def register_callbacks(self) -> None:
|
||||
"""defining callbacks to run after every training iteration"""
|
||||
self.callbacks = [
|
||||
Callback(
|
||||
self.occupancy_grid.update_every_num_iters,
|
||||
self.occupancy_grid.update_occupancy_grid,
|
||||
density_fn=self.field.density_fn,
|
||||
)
|
||||
]
|
||||
|
||||
def populate_fields(self):
|
||||
"""Set the fields."""
|
||||
# torch or tiny-cuda-nn version
|
||||
|
||||
Reference in new issue
Block a user