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

Update: GDumb + minor fixes #20

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Update: GDumb + minor fixes #20

wants to merge 9 commits into from

Conversation

mmasana
Copy link
Owner

@mmasana mmasana commented Aug 9, 2022

Added GDumb and some minor fixes

@mmasana mmasana added the enhancement New feature or request label Aug 9, 2022
@mmasana mmasana changed the title Update Update: GDumb + minor fixes Aug 9, 2022
Copy link
Contributor

@btwardow btwardow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have one single comment, where in the training loop iteration over data loader is a bit confusing. The rest is OK and clear.

Comment on lines +77 to +85
for images, targets in trn_loader:
# Get exemplars
if len(self.exemplars_dataset) > 0:
# 2. Balanced batches
exemplar_indices = torch.randperm(len(self.exemplars_dataset))[:trn_loader.batch_size]
images_exemplars, targets_exemplars = default_collate([self.exemplars_dataset[i]
for i in exemplar_indices])
images = torch.cat((images, images_exemplars), dim=0)
targets = torch.cat((targets, targets_exemplars), dim=0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmasana if the trn_loader is overridden with the exemplar_dataset, why here we do the permutation and not simply use images/targets out of it? It's more like drawing samples with the repetition than balanced batches, right?

@mmasana
Copy link
Owner Author

mmasana commented Aug 9, 2022

@btwardow I forgot to add a test for gdumb, can you add it? I'll check the comment you left and see if I can improve it

@btwardow
Copy link
Contributor

btwardow commented Aug 10, 2022 via email

@mmasana
Copy link
Owner Author

mmasana commented Aug 30, 2022

This will close #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants