mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-05 23:38:42 +08:00
brainstorming with matt on vanilla nerf implementation
This commit is contained in:
1 parent
0ac2708959
commit
c2f3c06b6c
9 files changed
+179
-19
No files matched your search
@@ -19,6 +19,7 @@ class FieldModule(nn.Module):
|
||||
def build_nn_modules(self) -> None:
|
||||
"""Function instantiates any torch.nn members within the module.
|
||||
If none exist, do nothing."""
|
||||
raise ValueError("This function shouldn't be called.")
|
||||
|
||||
def set_in_dim(self, in_dim: int) -> None:
|
||||
"""Sets input dimension of encoding
|
||||
|
||||
@@ -23,8 +23,7 @@ class FieldOutput(FieldModule):
|
||||
self.in_dim = in_dim
|
||||
self.out_dim = out_dim
|
||||
self.activation = activation
|
||||
|
||||
self.net = None
|
||||
self.net = self.build_nn_modules()
|
||||
|
||||
def build_nn_modules(self) -> None:
|
||||
layers = [nn.Linear(self.in_dim, self.out_dim)]
|
||||
|
||||
@@ -37,7 +37,7 @@ class MLP(FieldModule):
|
||||
self.layer_width = layer_width
|
||||
self.activation = activation
|
||||
self.out_activation = out_activation
|
||||
self.net = None
|
||||
self.net = self.build_nn_modules()
|
||||
|
||||
def build_nn_modules(self) -> None:
|
||||
"""Initialize mulilayer perceptron."""
|
||||
|
||||
Reference in new issue
Block a user