MCPcopy Create free account
hub / github.com/LargeWorldModel/LWM / quantize

Method quantize

lwm/vqgan.py:193–195  ·  view source on GitHub ↗
(encoding_indices)

Source from the content-addressed store, hash-verified

191 @nn.compact
192 def __call__(self, z, encoding_indices=None):
193 def quantize(encoding_indices):
194 w = jax.device_put(embeddings)
195 return w[(encoding_indices,)]
196 embeddings = self.param(
197 'embeddings',
198 lambda rng, shape, dtype: jax.random.uniform(

Callers 2

encodeMethod · 0.80
decodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected