when logits is all zero, why in_top_k will return true? · Issue #10489 · tensorflow/tensorflow · GitHub
Skip to content

when logits is all zero, why in_top_k will return true? #10489

Description

@aling1472

x = tf.constant([[2.0,9.0],[7.0,5.0],[0.0,0.0]])
y = tf.constant([1,0,1])
tf.nn.in_top_k(x,y,1).eval()
Out : array([ True, True, True], dtype=bool)
why not output array([ True, True, False], dtype=bool)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions