You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disentanglement is essential for representation learning as it promotes interpretability, generalization, improved learning, and robustness. It aligns with the goal of capturing meaningful and independent features of the data, facilitating more effective use of learned representations across various applications. For better disentanglement, the challenge is to disentangle underlying variations in a dataset without explicit ground truth information. This work introduces a key inductive bias aimed at encoding and decoding within an organized latent space. The strategy incorporated encompasses discretizing the latent space by assigning discrete code vectors through the utilization of an individual learnable scalar codebook for each dimension. This methodology enables their models to surpass robust prior methods effectively.
425
426
427
+
Be aware they had to use a very high weight decay for the results in this paper.
428
+
426
429
```python
427
430
import torch
428
431
from vector_quantize_pytorch import LatentQuantize
@@ -472,9 +475,12 @@ from vector_quantize_pytorch import LatentQuantize
472
475
levels = [4, 8, 16]
473
476
dim =9
474
477
num_codebooks =3
478
+
475
479
model = LatentQuantize(levels, dim, num_codebooks=num_codebooks)
480
+
476
481
input_tensor = torch.randn(2, 3, dim)
477
482
output_tensor, indices, loss = model(input_tensor)
483
+
478
484
assert output_tensor.shape == input_tensor.shape
479
485
assert indices.shape == (2, 3, num_codebooks)
480
486
assert loss.item() >=0
@@ -630,13 +636,14 @@ assert loss.item() >= 0
630
636
primaryClass = {cs.CV}
631
637
}
632
638
```
639
+
633
640
```bibtex
634
641
@misc{hsu2023disentanglement,
635
-
title={Disentanglement via Latent Quantization},
636
-
author={Kyle Hsu and Will Dorrell and James C. R. Whittington and Jiajun Wu and Chelsea Finn},
637
-
year={2023},
638
-
eprint={2305.18378},
639
-
archivePrefix={arXiv},
640
-
primaryClass={cs.LG}
642
+
title = {Disentanglement via Latent Quantization},
643
+
author = {Kyle Hsu and Will Dorrell and James C. R. Whittington and Jiajun Wu and Chelsea Finn},
0 commit comments