{"action":"created","issue":{"url":"https://api.github.com/repos/Theano/Theano/issues/1603","repository_url":"https://api.github.com/repos/Theano/Theano","labels_url":"https://api.github.com/repos/Theano/Theano/issues/1603/labels{/name}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/1603/comments","events_url":"https://api.github.com/repos/Theano/Theano/issues/1603/events","html_url":"https://github.com/Theano/Theano/issues/1603","id":22595888,"number":1603,"title":"Finish/document OpFromGraph","user":{"login":"nouiz","id":180987,"avatar_url":"https://avatars.githubusercontent.com/u/180987?v=3","gravatar_id":"","url":"https://api.github.com/users/nouiz","html_url":"https://github.com/nouiz","followers_url":"https://api.github.com/users/nouiz/followers","following_url":"https://api.github.com/users/nouiz/following{/other_user}","gists_url":"https://api.github.com/users/nouiz/gists{/gist_id}","starred_url":"https://api.github.com/users/nouiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nouiz/subscriptions","organizations_url":"https://api.github.com/users/nouiz/orgs","repos_url":"https://api.github.com/users/nouiz/repos","events_url":"https://api.github.com/users/nouiz/events{/privacy}","received_events_url":"https://api.github.com/users/nouiz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Theano/Theano/labels/Optimization","name":"Optimization","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Theano/Theano/milestones/6","html_url":"https://github.com/Theano/Theano/milestones/0.9","labels_url":"https://api.github.com/repos/Theano/Theano/milestones/6/labels","id":1586579,"number":6,"title":"0.9","description":"","creator":{"login":"nouiz","id":180987,"avatar_url":"https://avatars.githubusercontent.com/u/180987?v=3","gravatar_id":"","url":"https://api.github.com/users/nouiz","html_url":"https://github.com/nouiz","followers_url":"https://api.github.com/users/nouiz/followers","following_url":"https://api.github.com/users/nouiz/following{/other_user}","gists_url":"https://api.github.com/users/nouiz/gists{/gist_id}","starred_url":"https://api.github.com/users/nouiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nouiz/subscriptions","organizations_url":"https://api.github.com/users/nouiz/orgs","repos_url":"https://api.github.com/users/nouiz/repos","events_url":"https://api.github.com/users/nouiz/events{/privacy}","received_events_url":"https://api.github.com/users/nouiz/received_events","type":"User","site_admin":false},"open_issues":46,"closed_issues":1,"state":"open","created_at":"2016-02-16T19:03:10Z","updated_at":"2016-03-21T18:39:19Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2013-11-13T14:52:56Z","updated_at":"2016-03-24T21:08:24Z","closed_at":null,"body":"We have a meta op called OpFromGraph() defined in theano/compile/builders.py.\r\n\r\nThis is thing that are relatively fast to do and are needed to make it usable:\r\n- [ ] Document it so that user know how to user it.\r\n- [ ] test if it work with shared variable as input and if not make it work. Add test for that.\r\n- [ ] Move it correctly to the GPU. We can do it quickly for the old back-end, move all float32 inputs to the GPU. Otherwise, we need to compile the inner function, see which inputs get moved to the GPU, then create a new OpFromGraph with the corresponding input to the GPU. https://github.com/Theano/Theano/pull/2982\r\n\r\nThis is think that should be done to make it complete, but don't prevent people to use it:\r\n- [x] Move the grad work in the grad() method. This should remove the grad_depth parameter\r\n- [ ] Make the grad use only 1  op for all outputs, otherwise, this would duplicate computation.\r\n- [ ] Opt to unfold it and remove unused inputs/outputs (even more useful when better grad)\r\n- [x] implement infer_shape gh-3117\r\n- [ ] implement c_code when all ops have c code.\r\n- [ ] implement Rop\r\n- [ ] Implement \\__hash__ and \\__eq__\r\n- [ ] Make the grad return DisconnectedType\r\n- [ ] updates? givens?\r\n- [ ] test pickle of this op\r\n- [ ]  test random numbers with this op.\r\n\r\nThis is more an ideas that should be discussed before implementation:\r\n- [ ] Allow the inner graph to work inplace on the inputs?\r\n- [ ] implement optimization to remove that op to the global graph when it is small? This allow better optimization\r\n\r\nI put it tentatively in 0.6.1."},"comment":{"url":"https://api.github.com/repos/Theano/Theano/issues/comments/201021496","html_url":"https://github.com/Theano/Theano/issues/1603#issuecomment-201021496","issue_url":"https://api.github.com/repos/Theano/Theano/issues/1603","id":201021496,"user":{"login":"Sentient07","id":6195312,"avatar_url":"https://avatars.githubusercontent.com/u/6195312?v=3","gravatar_id":"","url":"https://api.github.com/users/Sentient07","html_url":"https://github.com/Sentient07","followers_url":"https://api.github.com/users/Sentient07/followers","following_url":"https://api.github.com/users/Sentient07/following{/other_user}","gists_url":"https://api.github.com/users/Sentient07/gists{/gist_id}","starred_url":"https://api.github.com/users/Sentient07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sentient07/subscriptions","organizations_url":"https://api.github.com/users/Sentient07/orgs","repos_url":"https://api.github.com/users/Sentient07/repos","events_url":"https://api.github.com/users/Sentient07/events{/privacy}","received_events_url":"https://api.github.com/users/Sentient07/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T21:08:24Z","updated_at":"2016-03-24T21:08:24Z","body":"@nouiz in this PR, https://github.com/Theano/Theano/pull/4039 , i am using props_dict() for GPUOPs. Since i am using the __props__ you have asked me to remove the existing __hash__ and __eq__ methods. I guess it also applies here and we don't need them anymore ?"}}