-
Notifications
You must be signed in to change notification settings - Fork 100
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
base: master
Are you sure you want to change the base?
Conversation
…enet with exemplars)
There was a problem hiding this 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.
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) |
There was a problem hiding this comment.
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?
@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 |
Ok. Will add it.
On Aug 9, 2022, 17:11, at 17:11, Marc Masana ***@***.***> wrote:
***@***.*** 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
--
Reply to this email directly or view it on GitHub:
#20 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
Adding missing function and unit tests
This will close #7 |
Added GDumb and some minor fixes