MCPcopy Create free account
hub / github.com/ashawkey/RAD-NeRF / __init__

Method __init__

shencoder/sphere_harmonics.py:62–70  ·  view source on GitHub ↗
(self, input_dim=3, degree=4)

Source from the content-addressed store, hash-verified

60
61class SHEncoder(nn.Module):
62 def __init__(self, input_dim=3, degree=4):
63 super().__init__()
64
65 self.input_dim = input_dim # coord dims, must be 3
66 self.degree = degree # 0 ~ 4
67 self.output_dim = degree ** 2
68
69 assert self.input_dim == 3, "SH encoder only support input dim == 3"
70 assert self.degree > 0 and self.degree <= 8, "SH encoder only supports degree in [1, 8]"
71
72 def __repr__(self):
73 return f"SHEncoder: input_dim={self.input_dim} degree={self.degree}"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected