(self, x)
| 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) |