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

Method forward

bitnet/one_bit_vision_transformers.py:40–42  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

38 self.gamma = nn.Parameter(torch.ones(heads, 1, dim) / self.scale)
39
40 def forward(self, x):
41 normed = F.normalize(x, dim=-1)
42 return normed * self.scale * self.gamma
43
44
45# classes

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected