{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1343","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1343/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1343/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1343/events","html_url":"https://github.com/tensorflow/tensorflow/issues/1343","id":137532805,"number":1343,"title":"sigmoid cross entropy doesn't verify shapes","user":{"login":"kshmelkov","id":10819534,"avatar_url":"https://avatars.githubusercontent.com/u/10819534?v=3","gravatar_id":"","url":"https://api.github.com/users/kshmelkov","html_url":"https://github.com/kshmelkov","followers_url":"https://api.github.com/users/kshmelkov/followers","following_url":"https://api.github.com/users/kshmelkov/following{/other_user}","gists_url":"https://api.github.com/users/kshmelkov/gists{/gist_id}","starred_url":"https://api.github.com/users/kshmelkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshmelkov/subscriptions","organizations_url":"https://api.github.com/users/kshmelkov/orgs","repos_url":"https://api.github.com/users/kshmelkov/repos","events_url":"https://api.github.com/users/kshmelkov/events{/privacy}","received_events_url":"https://api.github.com/users/kshmelkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-01T10:26:09Z","updated_at":"2016-03-01T21:49:19Z","closed_at":null,"body":"Hello,\r\n\r\nI have found a misleading behaviour in `sigmoid_cross_entropy_with_logits` function. If I pass a tensor of shape `(n, 1)` as logits and a tensor of shape `(n,)` as targets it outputs a tensor of `(n, n)` which is obviously different from tensor `(n,)` if both tensors have the same shape `(n,)`. Although api docs say that logits and targets must have the same shape, this example doesn't fail properly nor broadcast correctly.\r\n\r\nOS: Fedora 21\r\nTF v0.7.1 compiled from sources (tagged commit)."},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/190921351","html_url":"https://github.com/tensorflow/tensorflow/issues/1343#issuecomment-190921351","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1343","id":190921351,"user":{"login":"vrv","id":463737,"avatar_url":"https://avatars.githubusercontent.com/u/463737?v=3","gravatar_id":"","url":"https://api.github.com/users/vrv","html_url":"https://github.com/vrv","followers_url":"https://api.github.com/users/vrv/followers","following_url":"https://api.github.com/users/vrv/following{/other_user}","gists_url":"https://api.github.com/users/vrv/gists{/gist_id}","starred_url":"https://api.github.com/users/vrv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrv/subscriptions","organizations_url":"https://api.github.com/users/vrv/orgs","repos_url":"https://api.github.com/users/vrv/repos","events_url":"https://api.github.com/users/vrv/events{/privacy}","received_events_url":"https://api.github.com/users/vrv/received_events","type":"User","site_admin":false},"created_at":"2016-03-01T21:49:19Z","updated_at":"2016-03-01T21:49:19Z","body":"That is indeed a bug.  We can add the proper shape validation code in that function to prevent the unexpected broadcasting."}}