{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/3241","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/3241/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/3241/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/3241/events","html_url":"https://github.com/fchollet/keras/issues/3241","id":165991679,"number":3241,"title":"Model Summary shape not correct.","user":{"login":"shyamupa","id":1169210,"avatar_url":"https://avatars.githubusercontent.com/u/1169210?v=3","gravatar_id":"","url":"https://api.github.com/users/shyamupa","html_url":"https://github.com/shyamupa","followers_url":"https://api.github.com/users/shyamupa/followers","following_url":"https://api.github.com/users/shyamupa/following{/other_user}","gists_url":"https://api.github.com/users/shyamupa/gists{/gist_id}","starred_url":"https://api.github.com/users/shyamupa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shyamupa/subscriptions","organizations_url":"https://api.github.com/users/shyamupa/orgs","repos_url":"https://api.github.com/users/shyamupa/repos","events_url":"https://api.github.com/users/shyamupa/events{/privacy}","received_events_url":"https://api.github.com/users/shyamupa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-17T19:31:30Z","updated_at":"2016-07-28T15:59:44Z","closed_at":"2016-07-17T19:35:58Z","body":"I have a vector `alpha` of size `(None,20)` and `Y` of size `(None,300,20)`. I can compute the dot product to get a a vector of size `(None,300)`. However, the model summary shape does not agree with the expected shape. Code below should reproduce the error.\r\n\r\n``` python\r\nfrom keras.layers import Input, merge\r\nfrom keras.models import Model\r\nimport numpy as np\r\nimport keras.backend as K\r\n\r\n\r\ndef get_R(X):\r\n    Y, alpha = X[0], X[1]\r\n    ans = K.T.batched_dot(Y, alpha)\r\n    return ans\r\n\r\n\r\nalpha_val = np.arange(200).reshape((10, 20))\r\nY_val = np.arange(60000).reshape((10, 300, 20))\r\n\r\nY = Input(shape=(300, 20))\r\nalpha = Input(shape=(20,))\r\n\r\nr = merge([Y, alpha], output_shape=(300, 1), name=\"r_\", mode=get_R)\r\n\r\nmodel_me = Model(input=[Y, alpha], output=r)\r\n\r\nmodel_me.summary()\r\n\r\nprint(model_me.predict([Y_val, alpha_val]).shape)\r\n\r\n```\r\n\r\n\r\n- [x] Check that you are up-to-date with the master branch of Keras. You can update with:\r\npip install git+git://github.com/fchollet/keras.git --upgrade --no-deps\r\n\r\n- [x] If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:\r\npip install git+git://github.com/Theano/Theano.git --upgrade --no-deps\r\n\r\n- [x] Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short)."},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/235940570","html_url":"https://github.com/fchollet/keras/issues/3241#issuecomment-235940570","issue_url":"https://api.github.com/repos/fchollet/keras/issues/3241","id":235940570,"user":{"login":"shaunharker","id":5527375,"avatar_url":"https://avatars.githubusercontent.com/u/5527375?v=3","gravatar_id":"","url":"https://api.github.com/users/shaunharker","html_url":"https://github.com/shaunharker","followers_url":"https://api.github.com/users/shaunharker/followers","following_url":"https://api.github.com/users/shaunharker/following{/other_user}","gists_url":"https://api.github.com/users/shaunharker/gists{/gist_id}","starred_url":"https://api.github.com/users/shaunharker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaunharker/subscriptions","organizations_url":"https://api.github.com/users/shaunharker/orgs","repos_url":"https://api.github.com/users/shaunharker/repos","events_url":"https://api.github.com/users/shaunharker/events{/privacy}","received_events_url":"https://api.github.com/users/shaunharker/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T15:59:43Z","updated_at":"2016-07-28T15:59:43Z","body":"@alyato Sorry, but it is unclear to me what relationship your question has to PR #2938.  If you are looking for assistance using Keras the forum is [Keras Google Group](https://groups.google.com/forum/#!forum/keras-users). For instructions on how to submit issues please see <https://github.com/fchollet/keras/blob/master/CONTRIBUTING.md>. "}}
{"actor":{"display_login":"shaunharker"}}