{"action":"created","issue":{"url":"https://api.github.com/repos/Theano/Theano/issues/2730","labels_url":"https://api.github.com/repos/Theano/Theano/issues/2730/labels{/name}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/2730/comments","events_url":"https://api.github.com/repos/Theano/Theano/issues/2730/events","html_url":"https://github.com/Theano/Theano/issues/2730","id":66040984,"number":2730,"title":"data corruption in dnn_conv","user":{"login":"jonycgn","id":7364820,"avatar_url":"https://avatars.githubusercontent.com/u/7364820?v=3","gravatar_id":"","url":"https://api.github.com/users/jonycgn","html_url":"https://github.com/jonycgn","followers_url":"https://api.github.com/users/jonycgn/followers","following_url":"https://api.github.com/users/jonycgn/following{/other_user}","gists_url":"https://api.github.com/users/jonycgn/gists{/gist_id}","starred_url":"https://api.github.com/users/jonycgn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonycgn/subscriptions","organizations_url":"https://api.github.com/users/jonycgn/orgs","repos_url":"https://api.github.com/users/jonycgn/repos","events_url":"https://api.github.com/users/jonycgn/events{/privacy}","received_events_url":"https://api.github.com/users/jonycgn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-03T00:36:28Z","updated_at":"2015-04-07T17:00:11Z","closed_at":null,"body":"hi,\r\n\r\ni'm implementing a linear operator L which consists of a convolution followed by a subsampling. further, i'm implementing the transpose of the operator, so i'm upsampling followed by another convolution.\r\n\r\nin other words, i first do:\r\ny = L x\r\nand then:\r\nz = L^T y\r\n\r\nfor the convolution and downsampling, i simply use the subsample parameter of the convolution op.\r\nfor the upsampling prior to the second convolution, i create a zero-filled array followed by a set_subtensor, and then do a cross-correlation. (by the way, i wish upsampling was implemented so i wouldn't have to use lots of zeros as input!)\r\n\r\nso, overall, it's mostly just two convolutions stacked on top of each other (this is part of a larger project, but i isolated the problem to this part). my code has been working fine with the conv2d operator, but if i use dnn_conv, something gets messed up related to the subsampling.\r\n\r\nhere's an example:\r\n\r\noriginal image:\r\n![orig](https://cloud.githubusercontent.com/assets/7364820/6976337/7341cd4c-d976-11e4-99af-8cad341e8d5e.png)\r\n\r\nwhat i get with dnn_conv:\r\n![rec_fault](https://cloud.githubusercontent.com/assets/7364820/6976338/73445d50-d976-11e4-850c-750fd8a3739b.png)\r\n\r\nwhat i should get:\r\n![rec](https://cloud.githubusercontent.com/assets/7364820/6976339/73464b92-d976-11e4-825b-af09ce81ef6d.png)\r\n\r\nthe linear operator i'm using happens to be approximately orthonormal (i.e., a tight frame) so that the whole operation should be close to the identity (i'm ignoring boundary issues here, both convolutions are valid). you can see in the result that there is a little bit of noise. in the dnn_conv result, it looks like the subsampling parameter was ignored or something like that.\r\n\r\ni've confirmed this on theano 0.7 as well as bleeding edge, and on a GeForce GTX 780 Ti, and a GeForce TITAN Black.\r\n\r\ni will try to attach the debugprint as a separate file. please tell me what other info you need, i don't know where to look.\r\n\r\nthanks!\r\njohannes\r\n"},"comment":{"url":"https://api.github.com/repos/Theano/Theano/issues/comments/90646365","html_url":"https://github.com/Theano/Theano/issues/2730#issuecomment-90646365","issue_url":"https://api.github.com/repos/Theano/Theano/issues/2730","id":90646365,"user":{"login":"abergeron","id":1002504,"avatar_url":"https://avatars.githubusercontent.com/u/1002504?v=3","gravatar_id":"","url":"https://api.github.com/users/abergeron","html_url":"https://github.com/abergeron","followers_url":"https://api.github.com/users/abergeron/followers","following_url":"https://api.github.com/users/abergeron/following{/other_user}","gists_url":"https://api.github.com/users/abergeron/gists{/gist_id}","starred_url":"https://api.github.com/users/abergeron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abergeron/subscriptions","organizations_url":"https://api.github.com/users/abergeron/orgs","repos_url":"https://api.github.com/users/abergeron/repos","events_url":"https://api.github.com/users/abergeron/events{/privacy}","received_events_url":"https://api.github.com/users/abergeron/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T17:00:11Z","updated_at":"2015-04-07T17:00:11Z","body":"From the images you posted, this is not data corruption, but wrong shape info.  Can you try to run your code in DebugMode to make sure all the shapes are ok (theano flag mode=DebugMode)."}}