(self, quantized_z)
| 41 | return quantized_z |
| 42 | |
| 43 | def get_codebook_usage(self, quantized_z): |
| 44 | unique_bins = torch.unique(quantized_z).shape[0] |
| 45 | return unique_bins / self.num_bins |
| 46 | |
| 47 | def get_indices_from_latents(self, latents, dim=-1): |
| 48 | # to get fsq indices, for each dimension, we get the index and add it (so multiply by L then sum) |
nothing calls this directly
no outgoing calls
no test coverage detected