Skip to content

Acquasition fun#7

Open
rishabh-mondal wants to merge 3 commits intosustainability-lab:mainfrom
rishabh-mondal:acquasition_fun
Open

Acquasition fun#7
rishabh-mondal wants to merge 3 commits intosustainability-lab:mainfrom
rishabh-mondal:acquasition_fun

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