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

Method __init__

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

Source from the content-addressed store, hash-verified

16
17 class Spec(ctranslate2.specs.LayerSpec):
18 def __init__(self):
19 self.a = np.zeros([5], dtype=np.float32)
20 self.b = np.zeros([5], dtype=np.float16)
21 self.c = np.zeros([5], dtype=np.int32)
22 self.d = OPTIONAL
23 self.e = SubSpec()
24 self.f = True
25 self.g = "hello"
26
27 spec = Spec()
28 spec.validate()

Callers 1

__init__Method · 0.45

Calls 2

SubSpecClass · 0.85
dtypeMethod · 0.45

Tested by

no test coverage detected