🧶 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
Is your feature request related to a problem? Please describe.
Current metrics require that you provide a representation function. This is inconvenient and always repeated. Metrics also always require that the dataset be a DisentDataset.
dataset = DisentDataset(data)
# we always need to produce this same function
get_repr = lambda x: module.encode(x.to(module.device))
# to use with metrics
results = metric_mig(dataset, get_repr)
Describe the solution you'd like
Allow the metrics to directly accept the frameworks instead, and automatically wrap datasets with DisentDataset
# directly use the framework and raw data instead!
results = metric_mig(data, module)
Describe alternatives you've considered
Detect if isinstance(obj, DisentFramework) then handle everything automatically!
Or add a function to frameworks called get_representation
Or detect if an object has the property encode and use that instead!
Is your feature request related to a problem? Please describe. Current metrics require that you provide a representation function. This is inconvenient and always repeated. Metrics also always require that the dataset be a DisentDataset.
Describe the solution you'd like Allow the metrics to directly accept the frameworks instead, and automatically wrap datasets with DisentDataset
Describe alternatives you've considered
if isinstance(obj, DisentFramework)
then handle everything automatically!get_representation
encode
and use that instead!