MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / __init__

Method __init__

python/tests/test_spec.py:292–296  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

290
291 class TorchModel(ctranslate2.specs.ModelSpec):
292 def __init__(self):
293 super().__init__()
294 self.dense = common_spec.LinearSpec()
295 self.dense.weight = torch.ones([16, 4], dtype=variable_dtype)
296 self.dense.bias = torch.ones([16], dtype=variable_dtype)
297
298 @property
299 def name(self):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected