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

Array index out of bound when testing #13

Open
PaulCCCCCCH opened this issue Feb 20, 2019 · 1 comment
Open

Array index out of bound when testing #13

PaulCCCCCCH opened this issue Feb 20, 2019 · 1 comment

Comments

@PaulCCCCCCH
Copy link

PaulCCCCCCH commented Feb 20, 2019

In python/train_snli.py , line 246
The code gives index out of bound error, because results is a tuple with 2 elements.

     results = evaluate_final(classifier.restore, classifier.classify, [test_matched, test_mismatched,     test_snli], FIXED_PARAMETERS["batch_size"])
     logger.Log("Acc on multiNLI matched dev-set: %s" %(results[0]))
     logger.Log("Acc on multiNLI mismatched dev-set: %s" %(results[1]))
     logger.Log("Acc on SNLI test set: %s" %(results[2]))

I guess what you mean is the following:

     results = evaluate_final(classifier.restore, classifier.classify, [test_matched, test_mismatched,     test_snli], FIXED_PARAMETERS["batch_size"])
     logger.Log("Acc on multiNLI matched dev-set: %s" %(results[0][0]))
     logger.Log("Acc on multiNLI mismatched dev-set: %s" %(results[0][1]))
     logger.Log("Acc on SNLI test set: %s" %(results[0][2]))
     logger.Log(" correct count | total by length: %s" %(results[1]))

I changed it and it works fine on my machine.
Thanks.

@PaulCCCCCCH PaulCCCCCCH changed the title Test Test Issue Feb 20, 2019
@PaulCCCCCCH PaulCCCCCCH changed the title Test Issue Array index out of bound when testing Feb 20, 2019
@mithunpaul08
Copy link

mithunpaul08 commented Nov 10, 2019

I get same error for train_mnli.py also. However, my issue was that I had to uncomment some lines which replaced test files with dev files (lines 300-303) and some other changes.
You can use my fork if anyone wants to run tests.

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