{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/3586","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/3586/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/3586/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/3586/events","html_url":"https://github.com/fchollet/keras/issues/3586","id":173375409,"number":3586,"title":"help about dimension mismatch","user":{"login":"lomizandtyd","id":5525904,"avatar_url":"https://avatars.githubusercontent.com/u/5525904?v=3","gravatar_id":"","url":"https://api.github.com/users/lomizandtyd","html_url":"https://github.com/lomizandtyd","followers_url":"https://api.github.com/users/lomizandtyd/followers","following_url":"https://api.github.com/users/lomizandtyd/following{/other_user}","gists_url":"https://api.github.com/users/lomizandtyd/gists{/gist_id}","starred_url":"https://api.github.com/users/lomizandtyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lomizandtyd/subscriptions","organizations_url":"https://api.github.com/users/lomizandtyd/orgs","repos_url":"https://api.github.com/users/lomizandtyd/repos","events_url":"https://api.github.com/users/lomizandtyd/events{/privacy}","received_events_url":"https://api.github.com/users/lomizandtyd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-26T05:53:17Z","updated_at":"2016-08-26T06:18:09Z","closed_at":null,"body":"My target is to reproduce the result in \" LSTM Char CNN\" Network.. For language modeling\r\nIt has four stacked layers.\r\n```\r\nl1 : Char Embedding \r\nl2 : Convolution 1D\r\nl3 : Highway\r\nl4 : LSTM\r\nl5 : classifier (optional)\r\n```\r\n\r\nMy inputs is a word sequence.\r\nEach word is represented by a character sequence. \r\nSo the input shape is : \r\n(nb_sentence, nb_words, words_ids)\r\n\r\nAfter l1;\r\n(nb_sentence, nb_words, nb_chars, char_ids)\r\n\r\nAfter l2:\r\n(use cnn to extract the features from chars in a word)\r\n(nb_sentence, nb_words, words_features)\r\n\r\nl3 ~ : hyper nn for hyper features..\r\n\r\n---------\r\n\r\nAnd I build the network in keras by : \r\n\r\n```\r\nmodel = Sequential()\r\n\r\n# l1\r\nmodel.add(TimeDistributed(Embedding(max_char_id, char_embedding_feature, input_length=nb_chars), input_shape=(nb_words, nb_chars)))\r\n\r\n# l2, use \"max\" to get the features across chars' axis\r\nmodel.add(TimeDistributed(Convolution1D(128, 3, border_mode='valid')))\r\nmodel.add(Lambda(lambda x: K.max(x, axis=-2)))\r\n\r\n# l3, highway \r\nmodel.add(TimeDistributed(Highway()))\r\n\r\n# l4, LSTM\r\nmodel.add(LSTM(128, return_sequences=True))\r\n\r\n# l5, classifier\r\nmodel.add(TimeDistributed(Dense(max_word_id)))\r\nmodel.add(Activation('softmax'))\r\n\r\n```\r\n\r\nThe problem is : \r\nl3 raised a error: \r\n`Exception: Input 0 is incompatible with layer timedistributed_12: expected ndim=4, found ndim=3`\r\n\r\nI don't know how to figure out the problem...\r\n\r\nThank you all guys.  Sorry for early post issue..."},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/242639706","html_url":"https://github.com/fchollet/keras/issues/3586#issuecomment-242639706","issue_url":"https://api.github.com/repos/fchollet/keras/issues/3586","id":242639706,"user":{"login":"lomizandtyd","id":5525904,"avatar_url":"https://avatars.githubusercontent.com/u/5525904?v=3","gravatar_id":"","url":"https://api.github.com/users/lomizandtyd","html_url":"https://github.com/lomizandtyd","followers_url":"https://api.github.com/users/lomizandtyd/followers","following_url":"https://api.github.com/users/lomizandtyd/following{/other_user}","gists_url":"https://api.github.com/users/lomizandtyd/gists{/gist_id}","starred_url":"https://api.github.com/users/lomizandtyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lomizandtyd/subscriptions","organizations_url":"https://api.github.com/users/lomizandtyd/orgs","repos_url":"https://api.github.com/users/lomizandtyd/repos","events_url":"https://api.github.com/users/lomizandtyd/events{/privacy}","received_events_url":"https://api.github.com/users/lomizandtyd/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T06:18:09Z","updated_at":"2016-08-26T06:18:09Z","body":"Some other information:"}}
{"actor":{"display_login":"lomizandtyd"}}