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

Acquasition fun #7

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rishabh-mondal
Copy link

Implementing Maximum Entropy Acquisition for Ensemble Methods and Monte Carlo Dropout Sampling Strategies and test cases


#calculate entropy for each pool datapoint for each model
probs=torch.softmax(logits,dim=2)
entropy=-torch.sum(probs*torch.log(probs),dim=2)
Copy link
Contributor

Choose a reason for hiding this comment

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

@nipunbatra
Copy link
Contributor

image

Acquisition is spelled wrong in the PR title. Moreover, I don't know if fun stands for function or something else.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6678753082

  • 0 of 8 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.1%) to 59.17%

Changes Missing Coverage Covered Lines Changed/Added Lines %
astra/torch/al/acquisitions/max_entropy.py 0 8 0.0%
Totals Coverage Status
Change from base Build 6676378766: -1.1%
Covered Lines: 271
Relevant Lines: 458

💛 - Coveralls

@patel-zeel
Copy link
Member

@rishabh-mondal A few initial comments:

  • As I mentioned in Create acquisition functions #3, shape needs to be checked differently for Ensemble/MC and Deterministic. So, this function should also inherit DeterministicAcquisition.
  • Implement this function with https://pytorch.org/docs/stable/generated/torch.nn.LogSoftmax.html as suggested above.
  • Should we call it MaxEntropy or just Entropy? I'd go with the name Entropy. By default, all acquisitions are maximized.
  • Tests should be as a .py file, and it should tested with pytest locally.

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.

4 participants