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

Method __init__

bitnet/one_bit_vision_transformers.py:49–56  ·  view source on GitHub ↗
(self, dim, hidden_dim)

Source from the content-addressed store, hash-verified

47
48class FeedForward(nn.Module):
49 def __init__(self, dim, hidden_dim):
50 super().__init__()
51 self.net = nn.Sequential(
52 nn.LayerNorm(dim),
53 BitLinear(dim, hidden_dim),
54 nn.GELU(),
55 BitLinear(hidden_dim, dim),
56 )
57
58 def forward(self, x):
59 return self.net(x)

Callers

nothing calls this directly

Calls 2

BitLinearClass · 0.90
__init__Method · 0.45

Tested by

no test coverage detected