| 29 | class GaussianModel: |
| 30 | |
| 31 | def setup_functions(self): |
| 32 | def build_covariance_from_scaling_rotation(scaling, scaling_modifier, rotation): |
| 33 | L = build_scaling_rotation(scaling_modifier * scaling, rotation) |
| 34 | actual_covariance = L @ L.transpose(1, 2) |
| 35 | symm = strip_symmetric(actual_covariance) |
| 36 | return symm |
| 37 | |
| 38 | self.scaling_activation = torch.exp |
| 39 | self.scaling_inverse_activation = torch.log |
| 40 | |
| 41 | self.covariance_activation = build_covariance_from_scaling_rotation |
| 42 | |
| 43 | self.opacity_activation = torch.sigmoid |
| 44 | self.inverse_opacity_activation = inverse_sigmoid |
| 45 | |
| 46 | self.rotation_activation = torch.nn.functional.normalize |
| 47 | |
| 48 | def __init__(self, sh_degree : int): |
| 49 | self.active_sh_degree = 0 |