MCPcopy Create free account
hub / github.com/Stability-AI/stable-fast-3d / BaseModule

Class BaseModule

sf3d/models/utils.py:16–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15
16class BaseModule(nn.Module):
17 @dataclass
18 class Config:
19 pass
20
21 cfg: Config # add this to every subclass of BaseModule to enable static type checking
22
23 def __init__(
24 self, cfg: Optional[Union[dict, DictConfig]] = None, *args, **kwargs
25 ) -> None:
26 super().__init__()
27 self.cfg = parse_structured(self.Config, cfg)
28 self.configure(*args, **kwargs)
29
30 def configure(self, *args, **kwargs) -> None:
31 raise NotImplementedError
32
33
34def find_class(cls_string):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected