nmichlo / disent

🧶 Modular VAE disentanglement framework for python built with PyTorch Lightning ▸ Including metrics and datasets ▸ With strongly supervised, weakly supervised and unsupervised methods ▸ Easily configured and run with Hydra config ▸ Inspired by disentanglement_lib
https://disent.michlo.dev
MIT License
122 stars 18 forks source link

[REWRITE]: Data and Dataset Rewrite #14

Closed nmichlo closed 3 years ago

nmichlo commented 3 years ago

Data and Datasets currently have multiple levels of inheritance

Data: Data could be replaced with dependency injection of the StateSpace into the data classes. Data is then a ground-truth data if it provides the property states (or maybe factors).

Datasets: DisentDataset could be converted to a general class that inherits from torch Dataset, and accepts two initialising arguments: data and sampler. The various existing DisentDataset subclasses should be converted to Sampler classes that return a list of indices for each input index.

nmichlo commented 3 years ago

Implemented in 7f7d757133bc483e4637be8ee57b86b0bc22e116 release v0.1.0