MCPcopy Create free account
hub / github.com/YvanYin/DrivingWorld / encode

Method encode

modules/tokenizers/vq_model.py:124–128  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

122 self.post_quant_conv = nn.Conv2d(config.codebook_embed_dim, config.z_channels, 1)
123
124 def encode(self, x):
125 h = self.encoder(x)
126 h = self.quant_conv(h)
127 quant, emb_loss, info = self.quantize(h)
128 return quant, emb_loss, info
129
130 def encode_hacked(self, x):
131 h = self.encoder(x)

Callers 3

forwardMethod · 0.95
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected