{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/21517","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/21517/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/21517/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/21517/events","html_url":"https://github.com/tensorflow/tensorflow/pull/21517","id":349158487,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MzQwMzg5","number":21517,"title":"Fix documentation on softmax_cross_entropy_with_logits_v2","user":{"login":"mbrio","id":13557,"node_id":"MDQ6VXNlcjEzNTU3","avatar_url":"https://avatars2.githubusercontent.com/u/13557?v=4","gravatar_id":"","url":"https://api.github.com/users/mbrio","html_url":"https://github.com/mbrio","followers_url":"https://api.github.com/users/mbrio/followers","following_url":"https://api.github.com/users/mbrio/following{/other_user}","gists_url":"https://api.github.com/users/mbrio/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrio/subscriptions","organizations_url":"https://api.github.com/users/mbrio/orgs","repos_url":"https://api.github.com/users/mbrio/repos","events_url":"https://api.github.com/users/mbrio/events{/privacy}","received_events_url":"https://api.github.com/users/mbrio/received_events","type":"User","site_admin":false},"labels":[{"id":300136613,"node_id":"MDU6TGFiZWwzMDAxMzY2MTM=","url":"https://api.github.com/repos/tensorflow/tensorflow/labels/cla:%20no","name":"cla: no","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-09T14:41:25Z","updated_at":"2018-08-09T14:43:30Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/21517","html_url":"https://github.com/tensorflow/tensorflow/pull/21517","diff_url":"https://github.com/tensorflow/tensorflow/pull/21517.diff","patch_url":"https://github.com/tensorflow/tensorflow/pull/21517.patch"},"body":"- Return documentation was incorrectly stating shape of tensor\r\n\r\n```\r\nimport tensorflow as tf\r\nimport numpy as np\r\n\r\nlogits = np.array([\r\n    [5.0,  2.3, 0.0, -3.2, -0.8],\r\n    [2.3,  0.1, 1.8,  1.1,  1.2],\r\n    [-1.2, 1.1, 0.1,  2.5,  0.7]\r\n])\r\n\r\nlabels = np.array([\r\n    [1., 1., 0., 0., 0.],\r\n    [0., 0., 1., 0., 1.],\r\n    [0., 0., 0., 1., 0.]\r\n])\r\n\r\nx_entropy = tf.nn.softmax_cross_entropy_with_logits_v2(labels=labels, logits=logits)\r\n\r\nwith tf.Session() as sess:\r\n    print(sess.run(tf.shape(labels)))  # [3, 5]\r\n    print(sess.run(tf.shape(x_entropy)))  # [3]\r\n```\r\n\r\nIn this example we see that the `x_entropy` shape does not equal the shape of `labels` as stated in the original documentation, it is of shape `[batch_size]`."},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/411782504","html_url":"https://github.com/tensorflow/tensorflow/pull/21517#issuecomment-411782504","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/21517","id":411782504,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTc4MjUwNA==","user":{"login":"mbrio","id":13557,"node_id":"MDQ6VXNlcjEzNTU3","avatar_url":"https://avatars2.githubusercontent.com/u/13557?v=4","gravatar_id":"","url":"https://api.github.com/users/mbrio","html_url":"https://github.com/mbrio","followers_url":"https://api.github.com/users/mbrio/followers","following_url":"https://api.github.com/users/mbrio/following{/other_user}","gists_url":"https://api.github.com/users/mbrio/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrio/subscriptions","organizations_url":"https://api.github.com/users/mbrio/orgs","repos_url":"https://api.github.com/users/mbrio/repos","events_url":"https://api.github.com/users/mbrio/events{/privacy}","received_events_url":"https://api.github.com/users/mbrio/received_events","type":"User","site_admin":false},"created_at":"2018-08-09T14:43:30Z","updated_at":"2018-08-09T14:43:30Z","author_association":"NONE","body":"I signed it!"}}
{"actor":{"display_login":"mbrio"}}