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

Method forward

bitnet/at.py:104–107  ·  view source on GitHub ↗
(self, x, **kwargs)

Source from the content-addressed store, hash-verified

102 return out
103
104 def forward(self, x, **kwargs):
105 x_inp, x_labels = x[:, :-1], x[:, 1:]
106 logits = self.net(x_inp, **kwargs)
107 return F.cross_entropy(rearrange(logits, "b c n -> b n c"), x_labels)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected