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

Method encode

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

Source from the content-addressed store, hash-verified

190 return quantize
191
192 def encode(self, x):
193 shape = x.shape
194 # pre-process
195 x = self.preprocess(x)
196 # quantize
197 embed_ind = self.quantize(x)
198 # post-process
199 embed_ind = self.postprocess_emb(embed_ind, shape)
200 return embed_ind
201
202 def decode(self, embed_ind):
203 quantize = self.dequantize(embed_ind)

Callers 15

encodeMethod · 0.45
encodeMethod · 0.45
generate_tokenFunction · 0.45
encode_raw_corpusFunction · 0.45
encode_qaFunction · 0.45
get_stop_words_idsFunction · 0.45
make_contextFunction · 0.45
_tokenize_strFunction · 0.45
is_duplicate_absolutelyFunction · 0.45
get_minhashFunction · 0.45
generate_tokenFunction · 0.45
encode_raw_corpusFunction · 0.45

Calls 3

preprocessMethod · 0.95
quantizeMethod · 0.95
postprocess_embMethod · 0.95

Tested by

no test coverage detected