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

[Feature] Add perplexity metric #87

Merged
merged 8 commits into from
Feb 27, 2023

Conversation

go-with-me000
Copy link
Contributor

Motivation

This PR is submitted to increase perplexity metric

Modification

  1. Increased perplexity metric
  2. Added tests for perplexity
  3. This metric supports torch,tensorflow,oneflow,paddle,numpy

mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
tests/test_metrics/test_perplexity.py Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
mmeval/metrics/perplexity.py Outdated Show resolved Hide resolved
@go-with-me000 go-with-me000 reopened this Feb 6, 2023
loss of the model (or the negative log-likelihood of the sample).

Args:
ignore_labels (Union[int, List[int], None]): Integer specifying a
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ignore_labels (Union[int, List[int], None]): Integer specifying a
ignore_labels (int or list[int], optional): Integer specifying a

Copy link
Collaborator

@ice-tong ice-tong left a comment

Choose a reason for hiding this comment

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

LGTM with 1 comment

@zhouzaida zhouzaida merged commit 5348371 into open-mmlab:main Feb 27, 2023
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.

None yet

4 participants