MCPcopy Index your code
hub / github.com/Standard-Intelligence/hertz-dev / forward

Method forward

model.py:44–57  ·  view source on GitHub ↗

x: (B, S, D)

(self, x, return_latent=False, known_latent=None)

Source from the content-addressed store, hash-verified

42
43 @T.no_grad()
44 def forward(self, x, return_latent=False, known_latent=None):
45 """
46 x: (B, S, D)
47 """
48 if exists(known_latent):
49 return self.compressor.indices_to_codes(known_latent)
50
51 x = self.input(x)
52 x = self.ffnn(x)
53 x, tokens = self.compressor(x)
54
55 if return_latent:
56 return x, tokens
57 return x
58
59
60@si_module

Callers

nothing calls this directly

Calls 3

existsFunction · 0.90
indices_to_codesMethod · 0.80
inputMethod · 0.80

Tested by

no test coverage detected