Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Make accuracy meter consistent with one-hot targets #349

Closed

Conversation

simran2905
Copy link
Contributor

Summary:
This diff makes accuracy meter consistent with both class index and one-hot targets. When the targets are single-labeled, this meter works exactly as present. For multi-labeled targets, accuracy at top k considers a sample as correctly classified if it outputs atleast one correct class within top k.

This diff also makes both accuracy and PR meters infer target type (integer or 0/1) and calculate metrics accordingly.

Reviewed By: mannatsingh

Differential Revision: D19388765

Summary:
This diff makes accuracy meter consistent with both class index and one-hot targets. When the targets are single-labeled, this meter works exactly as present. For multi-labeled targets, accuracy at top k considers a sample as correctly classified if it outputs atleast one correct class within top k.

This diff also makes both accuracy and PR meters infer target type (integer or 0/1) and calculate metrics accordingly.

Reviewed By: mannatsingh

Differential Revision: D19388765

fbshipit-source-id: e25d27c9652a1cff5f03ac7ac7c1410e66312194
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Jan 22, 2020
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D19388765

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 1aeeeeb.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants