MCPcopy
hub / github.com/Pointcept/PointTransformerV3 / __init__

Method __init__

model.py:192–205  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

190 """
191
192 def __init__(self, *args, **kwargs):
193 super().__init__()
194 if len(args) == 1 and isinstance(args[0], OrderedDict):
195 for key, module in args[0].items():
196 self.add_module(key, module)
197 else:
198 for idx, module in enumerate(args):
199 self.add_module(str(idx), module)
200 for name, module in kwargs.items():
201 if sys.version_info < (3, 6):
202 raise ValueError("kwargs only supported in py36+")
203 if name in self._modules:
204 raise ValueError("name exists.")
205 self.add_module(name, module)
206
207 def __getitem__(self, idx):
208 if not (-len(self) <= idx < len(self)):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected