Skip to content

Conversation

@pgarun
Copy link

@pgarun pgarun commented Nov 5, 2025

In the original code self.tmp_radii is not declared in self.__init__()

In train.py when densify_and_prune() is called it declares self.tmp_radii and sets self.tmp_radii to None once densification and pruning is done.

Hence, if prune_points() in called it will throw error as attribute does not exist (or) if densify_and_prune() was called before it will throw error as we are accessing None.

To rectify this and for better practice

  1. Added self.tmp_radii = None to self.__init__()
  2. Added condition to check if self.temp_radii is not None before accessing

In the original code self.tmp_radii is not declared in self.__init__()

In train.py when densify_and_prune() is called it declares self.tmp_radii and sets self.tmp_radii to None once densification and pruning is done. 
        
Hence, if prune_points() in called it will throw error as attribute does not exist (or) if densify_and_prune() was called before it will throw error as we are accessing None.

To rectify this and for better practice
1. Added self.tmp_radii = None to self.__init__()
2. Added condition to check if self.temp_radii is not None before accessing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant