MCPcopy Create free account
hub / github.com/kyegomez/BitNet / __init__

Method __init__

bitnet/bit_moe.py:23–30  ·  view source on GitHub ↗
(self, dim: int, dropout: int = 0.1)

Source from the content-addressed store, hash-verified

21 """
22
23 def __init__(self, dim: int, dropout: int = 0.1):
24 super().__init__()
25 self.net = nn.Sequential(
26 BitLinear(dim, 4 * dim),
27 nn.ReLU(),
28 BitLinear(4 * dim, dim),
29 nn.Dropout(dropout),
30 )
31
32 def forward(self, x):
33 return self.net(x)

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 1

BitLinearClass · 0.90

Tested by

no test coverage detected