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

Can you please explain about the accuracy mechanism in the model ? #11

Open
shamanez opened this issue Dec 21, 2017 · 1 comment
Open

Comments

@shamanez
Copy link

In this line you calculate accuracies for a batch up to first 10 elements in the total list which has 50 indexes. I think you are trying to measure accuracy how the network would work with its memory and predict correctly when it sees the same image several times.

But I would like to have a clear definition. Can you please describe this?

@snowkylin
Copy link
Owner

It seems that you have already got the idea. In table 1 of MANN paper, the "1st" - "10th" means "if the image in the same class are shown k-th times, what the accuracy is". For example, if we have 3 classes and a sequence of length 15 like this:

y:     1 2 2 1 3 3 2 1 1 2 3 2 3 3 1
Output:2 2 2 3 1 3 2 1 1 2 3 2 3 3 1

Here, the 1st accuracy is 0.33. Notice that

  • When label 1 first occurs (1st in the sequence), the prediction (2) is wrong.
  • When label 2 first occurs (2nd in the sequence), the prediction (2) is right.
  • When label 3 first occurs (5th in the sequence), the prediction (1) is wrong.

So the accuracy should be calculated as 1/3 = 0.33.
the 2nd accuracy is 0.66. Notice that

  • When label 1 occurs in the second time (4th in the sequence), the prediction (3) is wrong.
  • When label 2 occurs in the second time (3th in the sequence), the prediction (2) is right.
  • When label 3 occurs in the second time (6th in the sequence), the prediction (3) is right.

So the accuracy should be calculated as 2/3 = 0.66.

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

No branches or pull requests

2 participants