mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 14:28:41 +08:00
some initial module structuring
This commit is contained in:
1 parent
8a53684131
commit
91f57726ae
7 files changed
+67
-18
No files matched your search
+25
-4
@@ -3,7 +3,7 @@ The Graph module contains all trainable parameters.
|
||||
"""
|
||||
from dataclasses import dataclass
|
||||
from torch import nn
|
||||
|
||||
from mattport.nerf.modules.positional_encoder import PositionalEncoder
|
||||
|
||||
@dataclass
|
||||
class GraphInputs:
|
||||
@@ -19,10 +19,31 @@ class Graph(nn.Module):
|
||||
nn (_type_): _description_
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
def __init__(self, modules_config: dict) -> None:
|
||||
super().__init__()
|
||||
|
||||
|
||||
# # for key in ...
|
||||
# temp = graph_config.positional_encoder
|
||||
# PositionalEncoder(name=temp.name, name=temp.inputs, )
|
||||
# self.modules = {}
|
||||
# self.modules["name"] = MLP()
|
||||
|
||||
|
||||
self.modules = {}
|
||||
|
||||
|
||||
self.encoder_0 = Encoder()
|
||||
self.mlp_0 = MLP()
|
||||
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
def forward(self):
|
||||
def forward(self, x):
|
||||
"""_summary_"""
|
||||
raise NotImplementedError
|
||||
# raise NotImplementedError
|
||||
|
||||
for name in queue: # "encoder_0",
|
||||
# assert name.output is not None
|
||||
x = self.modules[name](x)
|
||||
# self.mlp_0
|
||||
Reference in new issue
Block a user