Skip to content

Commit

Permalink
utils
Browse files Browse the repository at this point in the history
  • Loading branch information
jefequien committed Aug 1, 2024
1 parent c0e7dcb commit 7edee58
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ def knn(x: Tensor, K: int = 4) -> Tensor:
return torch.from_numpy(distances).to(x)


def rgb_to_sh(rgb: Tensor) -> Tensor:
C0 = 0.28209479177387814
return (rgb - 0.5) / C0


def set_random_seed(seed: int):
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)


def rgb_to_sh(rgb: Tensor) -> Tensor:
C0 = 0.28209479177387814
return (rgb - 0.5) / C0

0 comments on commit 7edee58

Please sign in to comment.