{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/5802","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/5802/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/5802/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/5802/events","html_url":"https://github.com/tensorflow/tensorflow/pull/5802","id":191211575,"number":5802,"title":"A theano.clone() equivalent for Tensorflow","user":{"login":"thjashin","id":5267554,"avatar_url":"https://avatars0.githubusercontent.com/u/5267554?v=3","gravatar_id":"","url":"https://api.github.com/users/thjashin","html_url":"https://github.com/thjashin","followers_url":"https://api.github.com/users/thjashin/followers","following_url":"https://api.github.com/users/thjashin/following{/other_user}","gists_url":"https://api.github.com/users/thjashin/gists{/gist_id}","starred_url":"https://api.github.com/users/thjashin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thjashin/subscriptions","organizations_url":"https://api.github.com/users/thjashin/orgs","repos_url":"https://api.github.com/users/thjashin/repos","events_url":"https://api.github.com/users/thjashin/events{/privacy}","received_events_url":"https://api.github.com/users/thjashin/received_events","type":"User","site_admin":false},"labels":[{"id":390482148,"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/awaiting%20review","name":"awaiting review","color":"fef2c0","default":false},{"id":300136587,"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false},{"id":404586594,"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower","name":"stat:awaiting tensorflower","color":"b60205","default":false}],"state":"closed","locked":false,"assignee":{"login":"sherrym","id":12770037,"avatar_url":"https://avatars3.githubusercontent.com/u/12770037?v=3","gravatar_id":"","url":"https://api.github.com/users/sherrym","html_url":"https://github.com/sherrym","followers_url":"https://api.github.com/users/sherrym/followers","following_url":"https://api.github.com/users/sherrym/following{/other_user}","gists_url":"https://api.github.com/users/sherrym/gists{/gist_id}","starred_url":"https://api.github.com/users/sherrym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sherrym/subscriptions","organizations_url":"https://api.github.com/users/sherrym/orgs","repos_url":"https://api.github.com/users/sherrym/repos","events_url":"https://api.github.com/users/sherrym/events{/privacy}","received_events_url":"https://api.github.com/users/sherrym/received_events","type":"User","site_admin":false},"assignees":[{"login":"sherrym","id":12770037,"avatar_url":"https://avatars3.githubusercontent.com/u/12770037?v=3","gravatar_id":"","url":"https://api.github.com/users/sherrym","html_url":"https://github.com/sherrym","followers_url":"https://api.github.com/users/sherrym/followers","following_url":"https://api.github.com/users/sherrym/following{/other_user}","gists_url":"https://api.github.com/users/sherrym/gists{/gist_id}","starred_url":"https://api.github.com/users/sherrym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sherrym/subscriptions","organizations_url":"https://api.github.com/users/sherrym/orgs","repos_url":"https://api.github.com/users/sherrym/repos","events_url":"https://api.github.com/users/sherrym/events{/privacy}","received_events_url":"https://api.github.com/users/sherrym/received_events","type":"User","site_admin":false}],"milestone":null,"comments":27,"created_at":"2016-11-23T08:28:05Z","updated_at":"2017-05-06T03:08:50Z","closed_at":"2017-05-06T00:45:36Z","pull_request":{"url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/5802","html_url":"https://github.com/tensorflow/tensorflow/pull/5802","diff_url":"https://github.com/tensorflow/tensorflow/pull/5802.diff","patch_url":"https://github.com/tensorflow/tensorflow/pull/5802.patch"},"body":"This an implementation of a `clone()` function for Tensorflow based on `meta_graph` utilities, inspired by discussion with @sherrym in #5477 .\r\n\r\nFeature requests on this can be found in #1070  #5479 . Previous implementations of copying graphs #557 does copy naively and doesn't have `replace` feature as in [theano.clone()](http://deeplearning.net/software/theano/library/#theano.clone).\r\n\r\nThough this implementation is almost good. It still has problems for now with control flow copies. To be specific, I'm not sure how to deal with collections of `cond_context` and `while_context`, because both of its `to_proto` functions only consider the case of stripping `export_scope`.\r\n\r\nNot copying `cond_context` collection to new operations (to their `_control_flow_context`) will cause problems described in #5477 , also demonstrated in the last test (`testCloneBatchNorm`) in this pull request, which is failed for now. I'm opening this PR early before that test pass, wondering if someone can have advice on dealing with control flow collections when cloning subgraphs. Thanks."},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/299611757","html_url":"https://github.com/tensorflow/tensorflow/pull/5802#issuecomment-299611757","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/5802","id":299611757,"user":{"login":"ebrevdo","id":1794715,"avatar_url":"https://avatars3.githubusercontent.com/u/1794715?v=3","gravatar_id":"","url":"https://api.github.com/users/ebrevdo","html_url":"https://github.com/ebrevdo","followers_url":"https://api.github.com/users/ebrevdo/followers","following_url":"https://api.github.com/users/ebrevdo/following{/other_user}","gists_url":"https://api.github.com/users/ebrevdo/gists{/gist_id}","starred_url":"https://api.github.com/users/ebrevdo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebrevdo/subscriptions","organizations_url":"https://api.github.com/users/ebrevdo/orgs","repos_url":"https://api.github.com/users/ebrevdo/repos","events_url":"https://api.github.com/users/ebrevdo/events{/privacy}","received_events_url":"https://api.github.com/users/ebrevdo/received_events","type":"User","site_admin":false},"created_at":"2017-05-06T03:08:49Z","updated_at":"2017-05-06T03:08:49Z","body":"+1 I think for now we need to reserve the right to make changes to this\npart of the tf codebase without maintaining a .clone implementation,\nespecially given the lack of internal maintainers.\n\nOn May 5, 2017 5:45 PM, \"Vijay Vasudevan\" <notifications@github.com> wrote:\n\n> I think for now, given that we don't really have any volunteer maintainers\n> of this code internally, we're going to close this PR; I think the current\n> implementation of GraphDef and state in TensorFlow's python implementation\n> is not very amenable to analysis and correctness, and while what you've\n> done is very neat, it will probably make it very difficult or impossible to\n> move the existing complex python code (control flow, state management) to\n> better implementations (not a proof, but just a gut feeling).\n>\n> I believe some of the work on improving functions and state management\n> will make something equivalent to clone() possible and maintainable, and\n> that's what we really need to make sure we do if we intend to make our\n> users happy.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/tensorflow/tensorflow/pull/5802#issuecomment-299604392>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABtim4hXvJfm5wuLY7Kd6F2SbPmX1GAXks5r28LFgaJpZM4K6UfI>\n> .\n>\n"}}
{"actor":{"display_login":"ebrevdo"}}