MCPcopy Create free account
hub / github.com/SmartFlowAI/EmoLLM / encode

Method encode

careyou/module/core_vq.py:292–296  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

290 return self._codebook.embed
291
292 def encode(self, x):
293 x = rearrange(x, "b d n -> b n d")
294 x = self.project_in(x)
295 embed_in = self._codebook.encode(x)
296 return embed_in
297
298 def decode(self, embed_ind):
299 quantize = self._codebook.decode(embed_ind)

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected