{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1869","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1869/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1869/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1869/events","html_url":"https://github.com/tensorflow/tensorflow/pull/1869","id":147643612,"number":1869,"title":"Add QOL improvements for tf.one_hot()","user":{"login":"samjabrahams","id":11607205,"avatar_url":"https://avatars.githubusercontent.com/u/11607205?v=3","gravatar_id":"","url":"https://api.github.com/users/samjabrahams","html_url":"https://github.com/samjabrahams","followers_url":"https://api.github.com/users/samjabrahams/followers","following_url":"https://api.github.com/users/samjabrahams/following{/other_user}","gists_url":"https://api.github.com/users/samjabrahams/gists{/gist_id}","starred_url":"https://api.github.com/users/samjabrahams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samjabrahams/subscriptions","organizations_url":"https://api.github.com/users/samjabrahams/orgs","repos_url":"https://api.github.com/users/samjabrahams/repos","events_url":"https://api.github.com/users/samjabrahams/events{/privacy}","received_events_url":"https://api.github.com/users/samjabrahams/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/cla:%20no","name":"cla: no","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"girving","id":70511,"avatar_url":"https://avatars.githubusercontent.com/u/70511?v=3","gravatar_id":"","url":"https://api.github.com/users/girving","html_url":"https://github.com/girving","followers_url":"https://api.github.com/users/girving/followers","following_url":"https://api.github.com/users/girving/following{/other_user}","gists_url":"https://api.github.com/users/girving/gists{/gist_id}","starred_url":"https://api.github.com/users/girving/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girving/subscriptions","organizations_url":"https://api.github.com/users/girving/orgs","repos_url":"https://api.github.com/users/girving/repos","events_url":"https://api.github.com/users/girving/events{/privacy}","received_events_url":"https://api.github.com/users/girving/received_events","type":"User","site_admin":false},"milestone":null,"comments":13,"created_at":"2016-04-12T06:15:10Z","updated_at":"2016-04-25T21:40:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/1869","html_url":"https://github.com/tensorflow/tensorflow/pull/1869","diff_url":"https://github.com/tensorflow/tensorflow/pull/1869.diff","patch_url":"https://github.com/tensorflow/tensorflow/pull/1869.patch"},"body":"This commit adds a Python wrapper for tf.one_hot(), and introduces two\r\nmain, backwards compatible, improvements, as mentioned in #1799:\r\n\r\n1. The parameters `on_value` and `off_value` now have default values 1 and 0\r\nrespectively, as 32-bit integers. Because the most common use case of\r\none_hot() is to create Tensors for one-hot encoding, it will save users\r\nsome headache to not have to manually type in these values by hand each\r\ntime it is used. The parameters can still be given different values as\r\nbefore, and this does not any previous behavior.\r\n2. `indices` and `depth` no longer have to be cast by hand as `int64` and\r\n`int32` values, respectively. Previously, one_hot() would complain if\r\nthese values weren't of the exact right type- it now casts the values to\r\nthe appropriate type on its own.\r\n\r\nPinging @ebrevdo for review."},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/214534741","html_url":"https://github.com/tensorflow/tensorflow/pull/1869#issuecomment-214534741","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1869","id":214534741,"user":{"login":"googlebot","id":5384588,"avatar_url":"https://avatars.githubusercontent.com/u/5384588?v=3","gravatar_id":"","url":"https://api.github.com/users/googlebot","html_url":"https://github.com/googlebot","followers_url":"https://api.github.com/users/googlebot/followers","following_url":"https://api.github.com/users/googlebot/following{/other_user}","gists_url":"https://api.github.com/users/googlebot/gists{/gist_id}","starred_url":"https://api.github.com/users/googlebot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googlebot/subscriptions","organizations_url":"https://api.github.com/users/googlebot/orgs","repos_url":"https://api.github.com/users/googlebot/repos","events_url":"https://api.github.com/users/googlebot/events{/privacy}","received_events_url":"https://api.github.com/users/googlebot/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T21:40:20Z","updated_at":"2016-04-25T21:40:20Z","body":"We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else.  If that's the case,  please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google.  If we're mistaken and you did author these commits, just reply here to confirm.\n\n<!-- need_author_consent -->"}}