{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/2747","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/2747/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/2747/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/2747/events","html_url":"https://github.com/tensorflow/tensorflow/pull/2747","id":159318078,"number":2747,"title":"Immediate execution mode with graph caching.","user":{"login":"yaroslavvb","id":23068,"avatar_url":"https://avatars.githubusercontent.com/u/23068?v=3","gravatar_id":"","url":"https://api.github.com/users/yaroslavvb","html_url":"https://github.com/yaroslavvb","followers_url":"https://api.github.com/users/yaroslavvb/followers","following_url":"https://api.github.com/users/yaroslavvb/following{/other_user}","gists_url":"https://api.github.com/users/yaroslavvb/gists{/gist_id}","starred_url":"https://api.github.com/users/yaroslavvb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaroslavvb/subscriptions","organizations_url":"https://api.github.com/users/yaroslavvb/orgs","repos_url":"https://api.github.com/users/yaroslavvb/repos","events_url":"https://api.github.com/users/yaroslavvb/events{/privacy}","received_events_url":"https://api.github.com/users/yaroslavvb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/awaiting%20review","name":"awaiting review","color":"fef2c0"},{"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/cla:%20no","name":"cla: no","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"keveman","id":229914,"avatar_url":"https://avatars.githubusercontent.com/u/229914?v=3","gravatar_id":"","url":"https://api.github.com/users/keveman","html_url":"https://github.com/keveman","followers_url":"https://api.github.com/users/keveman/followers","following_url":"https://api.github.com/users/keveman/following{/other_user}","gists_url":"https://api.github.com/users/keveman/gists{/gist_id}","starred_url":"https://api.github.com/users/keveman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keveman/subscriptions","organizations_url":"https://api.github.com/users/keveman/orgs","repos_url":"https://api.github.com/users/keveman/repos","events_url":"https://api.github.com/users/keveman/events{/privacy}","received_events_url":"https://api.github.com/users/keveman/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2016-06-09T02:47:32Z","updated_at":"2016-06-13T16:10:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/2747","html_url":"https://github.com/tensorflow/tensorflow/pull/2747","diff_url":"https://github.com/tensorflow/tensorflow/pull/2747.diff","patch_url":"https://github.com/tensorflow/tensorflow/pull/2747.patch"},"body":"Implementation of immediate mode execution in TensorFlow. The idea is to wrap original tensorflow API, but provide session/run management logic so that commands execute immediately, and graph caching to avoid modifying graph when same op is run repeatedly. Data is kept in TensorFlow runtime whenever possible using persistent tensors and transferred to Python runtime on demand when needed for printing/control flow.\r\n\r\n```\r\nimport tensorflow as tf\r\nfrom tensorflow.contrib import immediate\r\n\r\ntfi = immediate.Env(tf).tf        # wraps \"tf\" namespace, saves it as \"tfi\"\r\nval1 = tfi.ones((3,))             # creates tensor on GPU\r\nval2 = val1 + val1                # runs into tf.add, keeps result on GPU\r\nval3 = tfi.ones((2, 2, 2, 2))\r\nval4 = tfi.nn.conv2d(val3, val3, [1, 1, 1, 1], \"VALID\")   # run CuDNN conv2d\r\nif (tfi.reduce_sum(val3)>0.):     # runs reduce_sum on GPU, transfers bool to CPU\r\n  print(val4)                     # transfers whole tensor to CPU for display\r\n\r\n```\r\nThis is a single commit rebase of a previous pull request from https://github.com/tensorflow/tensorflow/pull/2346\r\n\r\n@keveman @yuanbyu "},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/225629219","html_url":"https://github.com/tensorflow/tensorflow/pull/2747#issuecomment-225629219","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/2747","id":225629219,"user":{"login":"yaroslavvb","id":23068,"avatar_url":"https://avatars.githubusercontent.com/u/23068?v=3","gravatar_id":"","url":"https://api.github.com/users/yaroslavvb","html_url":"https://github.com/yaroslavvb","followers_url":"https://api.github.com/users/yaroslavvb/followers","following_url":"https://api.github.com/users/yaroslavvb/following{/other_user}","gists_url":"https://api.github.com/users/yaroslavvb/gists{/gist_id}","starred_url":"https://api.github.com/users/yaroslavvb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaroslavvb/subscriptions","organizations_url":"https://api.github.com/users/yaroslavvb/orgs","repos_url":"https://api.github.com/users/yaroslavvb/repos","events_url":"https://api.github.com/users/yaroslavvb/events{/privacy}","received_events_url":"https://api.github.com/users/yaroslavvb/received_events","type":"User","site_admin":false},"created_at":"2016-06-13T16:10:45Z","updated_at":"2016-06-13T16:10:45Z","body":"So I just sequence below which brought a bunch of extra commits. [hood-devel](https://github.com/yaroslavvb/tensorflow/tree/hood-devel) is my develoment branch which is one commit ahead of master, and hood is my pull request branch, and merging hood-devel into hood like below pulls new commits into pull request for some reason\r\n\r\n```\r\ngit checkout hood-devel\r\ngit merge -s ours hood\r\ngit checkout hood\r\ngit merge hood-devel\r\ngit push\r\n\r\n```"}}
{"actor":{"display_login":"yaroslavvb"}}