{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/3339","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/3339/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/3339/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/3339/events","html_url":"https://github.com/fchollet/keras/issues/3339","id":168078505,"number":3339,"title":"Deconvolution2D fail to infer shape","user":{"login":"shahurik","id":754975,"avatar_url":"https://avatars.githubusercontent.com/u/754975?v=3","gravatar_id":"","url":"https://api.github.com/users/shahurik","html_url":"https://github.com/shahurik","followers_url":"https://api.github.com/users/shahurik/followers","following_url":"https://api.github.com/users/shahurik/following{/other_user}","gists_url":"https://api.github.com/users/shahurik/gists{/gist_id}","starred_url":"https://api.github.com/users/shahurik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shahurik/subscriptions","organizations_url":"https://api.github.com/users/shahurik/orgs","repos_url":"https://api.github.com/users/shahurik/repos","events_url":"https://api.github.com/users/shahurik/events{/privacy}","received_events_url":"https://api.github.com/users/shahurik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-28T11:57:44Z","updated_at":"2016-08-03T21:41:09Z","closed_at":null,"body":"I try to use Deconvolution2D layer with zero initialized weights and get infer_shape error\r\n\r\nWARNING (theano.tensor.opt): Failed to infer_shape from Op AbstractConv2d_gradInputs{border_mode='valid', subsample=(1, 1), filter_flip=True, imshp=(1,\r\n 7, 7), kshp=(1, 1, 3, 3), filter_dilation=(1, 1)}.\r\n\r\nFull error log is here: https://gist.github.com/shahurik/efa88e378e508c1de658151a5cdefc03\r\nKeras and Theano are upgraded from github just before filling that issue.\r\n\r\nHere is minimal code:\r\n```python\r\nfrom keras.models import Model\r\nfrom keras.layers import Input, Convolution2D, Deconvolution2D\r\n\r\nfrom numpy import eye, array\r\n\r\nimg = Input(shape=(1, 5, 5))\r\nconv = Deconvolution2D(1, 3, 3, output_shape=(1, 7, 7),  init='zero')(img)\r\n\r\nmodel = Model(img, conv)  \r\nmodel.summary()  \r\nprint(model.predict(array([[eye(5)]])))\r\n```\r\nIf I change Deconvolution2D to Convolution2D (and delete output_shape argument), works fine."},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/237383486","html_url":"https://github.com/fchollet/keras/issues/3339#issuecomment-237383486","issue_url":"https://api.github.com/repos/fchollet/keras/issues/3339","id":237383486,"user":{"login":"McVilla","id":5638025,"avatar_url":"https://avatars.githubusercontent.com/u/5638025?v=3","gravatar_id":"","url":"https://api.github.com/users/McVilla","html_url":"https://github.com/McVilla","followers_url":"https://api.github.com/users/McVilla/followers","following_url":"https://api.github.com/users/McVilla/following{/other_user}","gists_url":"https://api.github.com/users/McVilla/gists{/gist_id}","starred_url":"https://api.github.com/users/McVilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/McVilla/subscriptions","organizations_url":"https://api.github.com/users/McVilla/orgs","repos_url":"https://api.github.com/users/McVilla/repos","events_url":"https://api.github.com/users/McVilla/events{/privacy}","received_events_url":"https://api.github.com/users/McVilla/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T21:41:08Z","updated_at":"2016-08-03T21:41:08Z","body":"Thanks @shahurik . btw, did you solve your issue? "}}
{"actor":{"display_login":"McVilla"}}