added __repr__ to GaussianModel

This commit is contained in:
xvdp 2023-11-04 03:52:01 -07:00
parent 25b3cb8cc9
commit 27ef163bdf

View File

@ -58,6 +58,17 @@ class GaussianModel:
self.spatial_lr_scale = 0
self.setup_functions()
def __repr__(self):
format_string = self.__class__.__name__ + '()'
for k, v in self.__dict__.items():
if torch.is_tensor(v):
format_string +=f" {k}:\t{tuple(v.shape)}\n"
else:
format_string += f"{k}:\t{v}\n"
return format_string
def capture(self):
return (
self.active_sh_degree,