<p dir="auto">Based on the documentation <a href="https://www.tensorflow.org/api_docs/python/tf/nn/in_top_k" rel="nofollow">here</a> tf.nn.in_top_k treats ties as positive, which is almost never what you'd want. This is a major flaw, which leads to misleading metrics. An all zero predictions would give you 0 error with any targets. I think the default behavior should be to not count ties,</p>
<p dir="auto">This is a feature request related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="234166884" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/10489" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/10489/hovercard" href="https://github.com/tensorflow/tensorflow/issues/10489">#10489</a> (tie handling in function in_top_k)</p>
<p dir="auto">Would it be possible to add an option/argument specifying whether ties should be included or excluded?<br>
In other words, make it possible for ties to return False instead of True.</p>
<p dir="auto">Thanks!</p>