MCPcopy Create free account
hub / github.com/AkaliKong/MiniOneRec / get_codebook_entry

Method get_codebook_entry

rq/models/vq.py:32–38  ·  view source on GitHub ↗
(self, indices, shape=None)

Source from the content-addressed store, hash-verified

30 return self.embedding.weight
31
32 def get_codebook_entry(self, indices, shape=None):
33 # get quantized latent vectors
34 z_q = self.embedding(indices)
35 if shape is not None:
36 z_q = z_q.view(shape)
37
38 return z_q
39
40 def init_emb(self, data):
41

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected