{"action":"created","comment":{"url":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls/comments/71313777","id":71313777,"diff_hunk":"@@ -121,4 +51,122 @@ def extend_graph(graph)\n   \tTensorflow::TF_ExtendGraph(self.session, graph_def_to_c_array(graph.graph_def_raw), graph.graph_def_raw.length, self.status)\n   \tself.graph = graph\n   end\n+\n+  private\n+\n+  def initialize_inputs(inputs)\n+    input_names = Tensorflow::String_Vector.new\n+    input_values = Tensorflow::Tensor_Vector.new\n+    if inputs != nil","path":"lib/tensorflow/session.rb","position":140,"original_position":140,"commit_id":"89fda973b50973a673668f6466e5f39388249239","original_commit_id":"89fda973b50973a673668f6466e5f39388249239","user":{"login":"zverok","id":129656,"avatar_url":"https://avatars.githubusercontent.com/u/129656?v=3","gravatar_id":"","url":"https://api.github.com/users/zverok","html_url":"https://github.com/zverok","followers_url":"https://api.github.com/users/zverok/followers","following_url":"https://api.github.com/users/zverok/following{/other_user}","gists_url":"https://api.github.com/users/zverok/gists{/gist_id}","starred_url":"https://api.github.com/users/zverok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zverok/subscriptions","organizations_url":"https://api.github.com/users/zverok/orgs","repos_url":"https://api.github.com/users/zverok/repos","events_url":"https://api.github.com/users/zverok/events{/privacy}","received_events_url":"https://api.github.com/users/zverok/received_events","type":"User","site_admin":false},"body":"`unless inputs.nil?`","created_at":"2016-07-19T10:34:11Z","updated_at":"2016-07-19T10:34:11Z","html_url":"https://github.com/Arafatk/tensorflow.rb/pull/23#discussion_r71313777","pull_request_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls/comments/71313777"},"html":{"href":"https://github.com/Arafatk/tensorflow.rb/pull/23#discussion_r71313777"},"pull_request":{"href":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls/23","id":77911490,"html_url":"https://github.com/Arafatk/tensorflow.rb/pull/23","diff_url":"https://github.com/Arafatk/tensorflow.rb/pull/23.diff","patch_url":"https://github.com/Arafatk/tensorflow.rb/pull/23.patch","issue_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/issues/23","number":23,"state":"closed","locked":false,"title":"refactor Session for readability","user":{"login":"geoffreylitt","id":934016,"avatar_url":"https://avatars.githubusercontent.com/u/934016?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffreylitt","html_url":"https://github.com/geoffreylitt","followers_url":"https://api.github.com/users/geoffreylitt/followers","following_url":"https://api.github.com/users/geoffreylitt/following{/other_user}","gists_url":"https://api.github.com/users/geoffreylitt/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffreylitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffreylitt/subscriptions","organizations_url":"https://api.github.com/users/geoffreylitt/orgs","repos_url":"https://api.github.com/users/geoffreylitt/repos","events_url":"https://api.github.com/users/geoffreylitt/events{/privacy}","received_events_url":"https://api.github.com/users/geoffreylitt/received_events","type":"User","site_admin":false},"body":"As someone new to the project, I found `Session#run` quite difficult to follow.\r\n\r\nThis is an attempt at making it easier to understand for other developers, mainly by splitting it out into shorter methods with expressive names. This also now feels more typical of the Ruby style which tends to prefer short methods.\r\n\r\nI confirmed that this doesn't break any unit tests. (thanks for writing those, very helpful for refactoring)\r\n\r\nSome of these are subjective style things, so let me know what you think! Definitely open to feedback.","created_at":"2016-07-19T03:07:10Z","updated_at":"2016-07-19T10:34:11Z","closed_at":"2016-07-19T08:11:32Z","merged_at":"2016-07-19T08:11:32Z","merge_commit_sha":"bde64328d5696ab11a6f2064ea5bdebe2202a5ce","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls/23/commits","review_comments_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls/23/comments","review_comment_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/issues/23/comments","statuses_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/statuses/89fda973b50973a673668f6466e5f39388249239","head":{"label":"geoffreylitt:refactoring-session","ref":"refactoring-session","sha":"89fda973b50973a673668f6466e5f39388249239","user":{"login":"geoffreylitt","id":934016,"avatar_url":"https://avatars.githubusercontent.com/u/934016?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffreylitt","html_url":"https://github.com/geoffreylitt","followers_url":"https://api.github.com/users/geoffreylitt/followers","following_url":"https://api.github.com/users/geoffreylitt/following{/other_user}","gists_url":"https://api.github.com/users/geoffreylitt/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffreylitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffreylitt/subscriptions","organizations_url":"https://api.github.com/users/geoffreylitt/orgs","repos_url":"https://api.github.com/users/geoffreylitt/repos","events_url":"https://api.github.com/users/geoffreylitt/events{/privacy}","received_events_url":"https://api.github.com/users/geoffreylitt/received_events","type":"User","site_admin":false},"repo":{"id":63565950,"name":"tensorflow.rb","full_name":"geoffreylitt/tensorflow.rb","owner":{"login":"geoffreylitt","id":934016,"avatar_url":"https://avatars.githubusercontent.com/u/934016?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffreylitt","html_url":"https://github.com/geoffreylitt","followers_url":"https://api.github.com/users/geoffreylitt/followers","following_url":"https://api.github.com/users/geoffreylitt/following{/other_user}","gists_url":"https://api.github.com/users/geoffreylitt/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffreylitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffreylitt/subscriptions","organizations_url":"https://api.github.com/users/geoffreylitt/orgs","repos_url":"https://api.github.com/users/geoffreylitt/repos","events_url":"https://api.github.com/users/geoffreylitt/events{/privacy}","received_events_url":"https://api.github.com/users/geoffreylitt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geoffreylitt/tensorflow.rb","description":null,"fork":true,"url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb","forks_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/forks","keys_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/teams","hooks_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/hooks","issue_events_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/issues/events{/number}","events_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/events","assignees_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/assignees{/user}","branches_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/branches{/branch}","tags_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/tags","blobs_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/statuses/{sha}","languages_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/languages","stargazers_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/stargazers","contributors_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/contributors","subscribers_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/subscribers","subscription_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/subscription","commits_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/contents/{+path}","compare_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/merges","archive_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/downloads","issues_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/issues{/number}","pulls_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/pulls{/number}","milestones_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/milestones{/number}","notifications_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/labels{/name}","releases_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/releases{/id}","deployments_url":"https://api.github.com/repos/geoffreylitt/tensorflow.rb/deployments","created_at":"2016-07-18T03:01:57Z","updated_at":"2016-07-18T03:01:58Z","pushed_at":"2016-07-19T03:01:59Z","git_url":"git://github.com/geoffreylitt/tensorflow.rb.git","ssh_url":"git@github.com:geoffreylitt/tensorflow.rb.git","clone_url":"https://github.com/geoffreylitt/tensorflow.rb.git","svn_url":"https://github.com/geoffreylitt/tensorflow.rb","homepage":null,"size":2360,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Arafatk:master","ref":"master","sha":"4c413fc0e992b6b13361d79d911a87738fa5c00c","user":{"login":"Arafatk","id":11155207,"avatar_url":"https://avatars.githubusercontent.com/u/11155207?v=3","gravatar_id":"","url":"https://api.github.com/users/Arafatk","html_url":"https://github.com/Arafatk","followers_url":"https://api.github.com/users/Arafatk/followers","following_url":"https://api.github.com/users/Arafatk/following{/other_user}","gists_url":"https://api.github.com/users/Arafatk/gists{/gist_id}","starred_url":"https://api.github.com/users/Arafatk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arafatk/subscriptions","organizations_url":"https://api.github.com/users/Arafatk/orgs","repos_url":"https://api.github.com/users/Arafatk/repos","events_url":"https://api.github.com/users/Arafatk/events{/privacy}","received_events_url":"https://api.github.com/users/Arafatk/received_events","type":"User","site_admin":false},"repo":{"id":61302869,"name":"tensorflow.rb","full_name":"Arafatk/tensorflow.rb","owner":{"login":"Arafatk","id":11155207,"avatar_url":"https://avatars.githubusercontent.com/u/11155207?v=3","gravatar_id":"","url":"https://api.github.com/users/Arafatk","html_url":"https://github.com/Arafatk","followers_url":"https://api.github.com/users/Arafatk/followers","following_url":"https://api.github.com/users/Arafatk/following{/other_user}","gists_url":"https://api.github.com/users/Arafatk/gists{/gist_id}","starred_url":"https://api.github.com/users/Arafatk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arafatk/subscriptions","organizations_url":"https://api.github.com/users/Arafatk/orgs","repos_url":"https://api.github.com/users/Arafatk/repos","events_url":"https://api.github.com/users/Arafatk/events{/privacy}","received_events_url":"https://api.github.com/users/Arafatk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Arafatk/tensorflow.rb","description":"","fork":false,"url":"https://api.github.com/repos/Arafatk/tensorflow.rb","forks_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/forks","keys_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/teams","hooks_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/hooks","issue_events_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/issues/events{/number}","events_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/events","assignees_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/assignees{/user}","branches_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/branches{/branch}","tags_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/tags","blobs_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/git/refs{/sha}","trees_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/statuses/{sha}","languages_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/languages","stargazers_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/stargazers","contributors_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/contributors","subscribers_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/subscribers","subscription_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/subscription","commits_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/commits{/sha}","git_commits_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/git/commits{/sha}","comments_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/comments{/number}","issue_comment_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/issues/comments{/number}","contents_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/contents/{+path}","compare_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/merges","archive_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/downloads","issues_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/issues{/number}","pulls_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls{/number}","milestones_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/milestones{/number}","notifications_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/labels{/name}","releases_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/releases{/id}","deployments_url":"https://api.github.com/repos/Arafatk/tensorflow.rb/deployments","created_at":"2016-06-16T14:59:51Z","updated_at":"2016-07-19T04:53:34Z","pushed_at":"2016-07-19T08:11:33Z","git_url":"git://github.com/Arafatk/tensorflow.rb.git","ssh_url":"git@github.com:Arafatk/tensorflow.rb.git","clone_url":"https://github.com/Arafatk/tensorflow.rb.git","svn_url":"https://github.com/Arafatk/tensorflow.rb","homepage":null,"size":2362,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls/23"},"html":{"href":"https://github.com/Arafatk/tensorflow.rb/pull/23"},"issue":{"href":"https://api.github.com/repos/Arafatk/tensorflow.rb/issues/23"},"comments":{"href":"https://api.github.com/repos/Arafatk/tensorflow.rb/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Arafatk/tensorflow.rb/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/Arafatk/tensorflow.rb/statuses/89fda973b50973a673668f6466e5f39388249239"}}}}
{"actor":{"display_login":"zverok"}}