-
Notifications
You must be signed in to change notification settings - Fork 86
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
EPIG implementation #270
EPIG implementation #270
Conversation
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.
This is an awesome start! Feel free to ignore my comments for now, I just wanted to not forget them.
baal/active/heuristics/heuristics.py
Outdated
""" | ||
logprobs = torch.clone(probs) # [*N, Cl] | ||
logprobs[probs > 0] = torch.log(probs[probs > 0]) # [*N, Cl] | ||
return -torch.sum((probs * logprobs), dim=-1) # [*N,] |
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.
This can all be cut to return -torch.sum(torch.xlogy(probs, probs), dim=-1)
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.
Very nice!
With @fbickfordsmith latest AISTAT paper link I think we should really more this PR forward. I refactored a bit and assuming the equations in EPIG are correct I think we can merge that pretty soon. Freddie, if your energy takes you there, could you review the code of EPIG? In particular the |
Great that you're moving this forward! Happy to support. I'm at ICLR this week so can't look at the code for a while, but I've added this to my to-do list. |
Nice work @Dref360 @reeshipaul! Looks good overall. I have some minor suggestions. Probably easiest if I push some changes for you to look at. What's the best way to do that? If @reeshipaul gives me push access to https://github.com/reeshipaul/baal then I could create a branch there. Open to alternatives too. |
In case @reeshipaul doesn't answer back, feel free to submit comments with suggestion. |
@fbickfordsmith this has been merged into baal-org:features/epig_release, please submit a PR against it with your changes. |
Summary:
Issue #259
Features:
Checklist:
tests/documentation_test.py
).