{"action":"closed","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/2798","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/2798/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/2798/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/2798/events","html_url":"https://github.com/fchollet/keras/issues/2798","id":156447685,"number":2798,"title":"Embedding layer size","user":{"login":"ipoletaev","id":14129555,"avatar_url":"https://avatars.githubusercontent.com/u/14129555?v=3","gravatar_id":"","url":"https://api.github.com/users/ipoletaev","html_url":"https://github.com/ipoletaev","followers_url":"https://api.github.com/users/ipoletaev/followers","following_url":"https://api.github.com/users/ipoletaev/following{/other_user}","gists_url":"https://api.github.com/users/ipoletaev/gists{/gist_id}","starred_url":"https://api.github.com/users/ipoletaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipoletaev/subscriptions","organizations_url":"https://api.github.com/users/ipoletaev/orgs","repos_url":"https://api.github.com/users/ipoletaev/repos","events_url":"https://api.github.com/users/ipoletaev/events{/privacy}","received_events_url":"https://api.github.com/users/ipoletaev/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-24T08:24:32Z","updated_at":"2016-06-19T08:53:08Z","closed_at":"2016-06-19T08:53:08Z","body":"Good day for everyone! I have noticed interesting thing: when you try to make embedding layer in the \"Sequential\" or in the \"Graph\" model - they have different input shapes... \r\nFor example:\r\n\r\n```\r\nemb_model = Sequential()\r\nemb_model.add(Embedding(vocab_size, embedding_size, input_length=maxlen))\r\n...\r\n```\r\nSo, the input shape of `emb_model` is `(None,vocab_size)` and the output shape is `(None,maxlen,embedding_size)` as expected. Even though a very strange input size, with the input data shape - `(None,maxlen)` everything works correctly.\r\n\r\nLet's try make the same \"Graph\" model:\r\n\r\n```\r\n...\r\nmodel  = Graph()\r\nmodel.add_input(name='word_emb_input',input_shape=(maxlen,),dtype=int)\r\nmodel.add_node(emb_model,name=\"emb_model\",input=\"word_emb_input\")\r\n```\r\nNow, if we look at the size of the input - instead of `(None,vocab_size)` shape, like in the \"Sequential\" model, we got `(None,maxlen)` shape. \r\n\r\nIs it normal? Thanks for answering. \r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"ipoletaev"}}