{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/2503","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/2503/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/2503/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/2503/events","html_url":"https://github.com/fchollet/keras/pull/2503","id":150944042,"number":2503,"title":"remove subgraph compilation/execution step in theano backend conv2d","user":{"login":"Philip-Bachman","id":1105966,"avatar_url":"https://avatars.githubusercontent.com/u/1105966?v=3","gravatar_id":"","url":"https://api.github.com/users/Philip-Bachman","html_url":"https://github.com/Philip-Bachman","followers_url":"https://api.github.com/users/Philip-Bachman/followers","following_url":"https://api.github.com/users/Philip-Bachman/following{/other_user}","gists_url":"https://api.github.com/users/Philip-Bachman/gists{/gist_id}","starred_url":"https://api.github.com/users/Philip-Bachman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Philip-Bachman/subscriptions","organizations_url":"https://api.github.com/users/Philip-Bachman/orgs","repos_url":"https://api.github.com/users/Philip-Bachman/repos","events_url":"https://api.github.com/users/Philip-Bachman/events{/privacy}","received_events_url":"https://api.github.com/users/Philip-Bachman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-25T18:22:56Z","updated_at":"2016-04-26T18:02:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fchollet/keras/pulls/2503","html_url":"https://github.com/fchollet/keras/pull/2503","diff_url":"https://github.com/fchollet/keras/pull/2503.diff","patch_url":"https://github.com/fchollet/keras/pull/2503.patch"},"body":"This change fixes a problem that occurs when the \"kernel\" used in a convolution is the result of a symbolic operation elsewhere in the graph. In this case, the `kernel.eval()` step in the current master branch will fail, as the inputs required for compiling and executing the eval are neither available nor provided when calling eval.\r\n\r\nI fixed this by changing the code to keep all computations symbolic.\r\n\r\nThe existing code works for most people because the input kernel is typically a TensorSharedVariable, for which `var.eval()` can just call `var.get_value()`, without requiring any additional inputs.\r\n\r\nI've tested that the proposed change works for both odd-width and even-width kernels."},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/214830426","html_url":"https://github.com/fchollet/keras/pull/2503#issuecomment-214830426","issue_url":"https://api.github.com/repos/fchollet/keras/issues/2503","id":214830426,"user":{"login":"Philip-Bachman","id":1105966,"avatar_url":"https://avatars.githubusercontent.com/u/1105966?v=3","gravatar_id":"","url":"https://api.github.com/users/Philip-Bachman","html_url":"https://github.com/Philip-Bachman","followers_url":"https://api.github.com/users/Philip-Bachman/followers","following_url":"https://api.github.com/users/Philip-Bachman/following{/other_user}","gists_url":"https://api.github.com/users/Philip-Bachman/gists{/gist_id}","starred_url":"https://api.github.com/users/Philip-Bachman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Philip-Bachman/subscriptions","organizations_url":"https://api.github.com/users/Philip-Bachman/orgs","repos_url":"https://api.github.com/users/Philip-Bachman/repos","events_url":"https://api.github.com/users/Philip-Bachman/events{/privacy}","received_events_url":"https://api.github.com/users/Philip-Bachman/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T18:02:07Z","updated_at":"2016-04-26T18:02:07Z","body":"I'm using a custom layer in which the convolution kernel is selected for each input batch by slicing the underlying parameter matrix. E.g., in a large convolutional GRU, if we want to drop out half the state dimensions for the full feedforward pass, we (ideally) could accelerate computation significantly by only performing computation for the relevant dimensions, rather than computing a full state update and masking."}}