Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-task CV and various fixes #46

Merged
merged 15 commits into from
Apr 17, 2023
Merged

Multi-task CV and various fixes #46

merged 15 commits into from
Apr 17, 2023

Conversation

andrrizzi
Copy link
Collaborator

@andrrizzi andrrizzi commented Apr 17, 2023

Description

  1. Implement MultiTaskCV. Because the class dynamically inherits from the main CV, this doesn't work if the main CV uses __slots__ but I thought this a rare case that we could avoid supporting.
  2. Fix FastDictionaryLoader.get_stats().
    • By default, when there are multiple datasets, it computes the stats for all of them unless the dataset_idx argument is given.
    • I've also removed the batch iteration to simplify a bit the code for the multidataset case and because DictionaryDatasets already have everything in memory anyway so this should be slightly faster than doing a for loop.
  3. Extended AutocorrelationLoss and FisherDiscriminantLoss to multivariate features. I've also added a Lorentzian regularization to FisherDiscriminantLoss to avoid it to explode.
  4. I've fixed a weird bug in the VariationalAutoencoderCV that resulted in wrong torchscript models.
    • Torchscript complained that I was splitting the output of the encoder into two (for the mean and variance) so I added two separate linear layers mean_nn and logvar_nn.
    • I also modified FeedForward to support a last_layer_activation argument so that we can configure easily the encoder to have an activation layer also to the output layer (which is then fed to mean/logvar_nn).
  5. Various fixes to PEP8 style, documentation, and tests.

Status

  • Ready to go

@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Merging #46 (54ef4b9) into lightning (6b5ac84) will not change coverage.
The diff coverage is 0.00%.

@andrrizzi andrrizzi merged commit f61ac7f into lightning Apr 17, 2023
@andrrizzi andrrizzi deleted the multi-task branch April 17, 2023 19:43
@luigibonati luigibonati mentioned this pull request Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant