-
-
Notifications
You must be signed in to change notification settings - Fork 623
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
Add Entropy metric #3210
Add Entropy metric #3210
Conversation
assert not ent._sum_of_entropies.requires_grad | ||
|
||
|
||
@pytest.mark.distributed |
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.
For distributed config tests, could you please rewrite them using new testing formalism that we are trying to adopt. Here is an example of the code to inspire of:
ignite/tests/ignite/metrics/test_recall.py
Lines 422 to 426 in 5fe7443
@pytest.mark.usefixtures("distributed") | |
class TestDistributed: | |
@pytest.mark.parametrize("average", [False, "macro", "weighted", "micro"]) | |
@pytest.mark.parametrize("n_epochs", [1, 2]) | |
def test_integration_multiclass(self, average, n_epochs): |
Here is a PR showing how to pass from old code to the new one:
https://github.com/pytorch/ignite/pull/3208/files#diff-c56c264ef288f88e5738e9ad22de66dffd4c58d2e656eb62e8dbaa678672317d
Thanks!
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.
@kzkadc thanks for the PR, lgtm now
Updating distributed config test to the new code can be done in a follow-up PR if you would like.
Let's see if CI is passing and merge this PR
@kzkadc can you please run |
@kzkadc this failure is related: https://github.com/pytorch/ignite/actions/runs/8391979913/job/22983553399?pr=3210#step:9:345
|
Description: adds Entropy metric.$H=\sum_c - p_c \log p_c$ , where $p_c$ is the predicted probability for $c$ -th class.
Entropy is often used when evaluating uncertainty of classification predictions.
It is computed as
Check list: