{"action":"opened","issue":{"url":"https://api.github.com/repos/sherjilozair/char-rnn-tensorflow/issues/4","labels_url":"https://api.github.com/repos/sherjilozair/char-rnn-tensorflow/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/sherjilozair/char-rnn-tensorflow/issues/4/comments","events_url":"https://api.github.com/repos/sherjilozair/char-rnn-tensorflow/issues/4/events","html_url":"https://github.com/sherjilozair/char-rnn-tensorflow/issues/4","id":120847016,"number":4,"title":"Why is `embeddings` in `model.py` random, instead of one-hot?","user":{"login":"rhaps0dy","id":4928242,"avatar_url":"https://avatars.githubusercontent.com/u/4928242?v=3","gravatar_id":"","url":"https://api.github.com/users/rhaps0dy","html_url":"https://github.com/rhaps0dy","followers_url":"https://api.github.com/users/rhaps0dy/followers","following_url":"https://api.github.com/users/rhaps0dy/following{/other_user}","gists_url":"https://api.github.com/users/rhaps0dy/gists{/gist_id}","starred_url":"https://api.github.com/users/rhaps0dy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhaps0dy/subscriptions","organizations_url":"https://api.github.com/users/rhaps0dy/orgs","repos_url":"https://api.github.com/users/rhaps0dy/repos","events_url":"https://api.github.com/users/rhaps0dy/events{/privacy}","received_events_url":"https://api.github.com/users/rhaps0dy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-07T19:21:48Z","updated_at":"2015-12-07T19:21:48Z","closed_at":null,"body":"Hello,\r\n\r\nIf I understand correctly, the tridimensional `inputs` tensor is built by looking up the n-th row of `embeddings` for each number in the bidimensional `self.input_data` tensor. The rows of `embeddings` have the same size as the RNN's internal layers. This seems to be the way to input the different characters to the network.\r\n\r\nThe Tensorflow variable `\"embeddings\"` has nothing assigned to it explicitly, therefore it is drawn from a uniform distribution each time `train.py` is ran. Why is that? I would have expected embeddings to be a matrix of one-hot row vectors, encoding the different characters; and having that mapped to the internal layer by weights as in https://gist.github.com/karpathy/d4dee566867f8291f086 .\r\n\r\nAlso, printing `embeddings` at the end of every run, I notice that its value changes every time.\r\n\r\nI would be very grateful if someone would explain to me what is going on here.\r\n\r\nYours truly,\r\nrhaps0dy"}}