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

babi_story accuracy is incorrect for path-finding task #1

Open
MMMMasterM opened this issue Nov 15, 2017 · 0 comments
Open

babi_story accuracy is incorrect for path-finding task #1

MMMMasterM opened this issue Nov 15, 2017 · 0 comments

Comments

@MMMMasterM
Copy link

MMMMasterM commented Nov 15, 2017

From babi_story/module.py:
final_pred = tf.one_hot(tf.argmax(pred[0], axis=1), depth=self.answer_vocab_size) * answer_bool[0] + tf.one_hot(tf.argmax(pred[1], axis=1), depth=self.answer_vocab_size) * answer_bool[1] + tf.one_hot(tf.argmax(pred[2], axis=1), depth=self.answer_vocab_size) * answer_bool[2]

final_answer = a_s[0] * answer_bool[0] + a_s[1] * answer_bool[1] + a_s[2] * answer_bool[2]

The pathfinding task depends on the order of the answers but the code above makes the accuracy measurement independent from the order of pred[0], pred[1], pred[2] and a_s[0], a_s[1], a_s[2].

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

1 participant