{"action":"created","comment":{"url":"https://api.github.com/repos/anishathalye/neural-style/pulls/comments/84332581","pull_request_review_id":5116065,"id":84332581,"diff_hunk":"@@ -111,20 +116,39 @@ def print_progress(i, last=False):\n         best = None\n         with tf.Session() as sess:\n             sess.run(tf.initialize_all_variables())\n-            for i in range(iterations):\n-                last_step = (i == iterations - 1)\n-                print_progress(i, last=last_step)\n-                train_step.run()\n-\n-                if (checkpoint_iterations and i % checkpoint_iterations == 0) or last_step:\n+            if optimizer == 'adam':\n+                for i in range(iterations):\n+                    last_step = (i == iterations - 1)\n+                    print_progress(i, last=last_step)\n+                    train_step()\n+\n+                    if (checkpoint_iterations and i % checkpoint_iterations == 0) or last_step:\n+                        this_loss = loss.eval()\n+                        if this_loss < best_loss:\n+                            best_loss = this_loss\n+                            best = image.eval()\n+                        yield (\n+                            (None if last_step else i),\n+                            vgg.unprocess(best.reshape(shape[1:]), mean_pixel)\n+                        )\n+            elif optimizer == 'lbfgs':\n+                if not checkpoint_iterations:","path":"stylize.py","position":49,"original_position":49,"commit_id":"19b04792cc39d6dc6c5d7571d16952ddfa94f66b","original_commit_id":"8d5e44cd2cce38dc7c375e060aed3c9884aa6061","user":{"login":"anishathalye","id":3526486,"avatar_url":"https://avatars.githubusercontent.com/u/3526486?v=3","gravatar_id":"","url":"https://api.github.com/users/anishathalye","html_url":"https://github.com/anishathalye","followers_url":"https://api.github.com/users/anishathalye/followers","following_url":"https://api.github.com/users/anishathalye/following{/other_user}","gists_url":"https://api.github.com/users/anishathalye/gists{/gist_id}","starred_url":"https://api.github.com/users/anishathalye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anishathalye/subscriptions","organizations_url":"https://api.github.com/users/anishathalye/orgs","repos_url":"https://api.github.com/users/anishathalye/repos","events_url":"https://api.github.com/users/anishathalye/events{/privacy}","received_events_url":"https://api.github.com/users/anishathalye/received_events","type":"User","site_admin":false},"body":"Yeah… ideally, we'd investigate what's going on, and then hopefully we can get away with a much smaller diff to achieve the same effect.","created_at":"2016-10-20T17:16:38Z","updated_at":"2016-10-20T17:16:59Z","html_url":"https://github.com/anishathalye/neural-style/pull/38#discussion_r84332581","pull_request_url":"https://api.github.com/repos/anishathalye/neural-style/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/anishathalye/neural-style/pulls/comments/84332581"},"html":{"href":"https://github.com/anishathalye/neural-style/pull/38#discussion_r84332581"},"pull_request":{"href":"https://api.github.com/repos/anishathalye/neural-style/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/anishathalye/neural-style/pulls/38","id":89264017,"html_url":"https://github.com/anishathalye/neural-style/pull/38","diff_url":"https://github.com/anishathalye/neural-style/pull/38.diff","patch_url":"https://github.com/anishathalye/neural-style/pull/38.patch","issue_url":"https://api.github.com/repos/anishathalye/neural-style/issues/38","number":38,"state":"open","locked":false,"title":"Added lbfgs support","user":{"login":"petronny","id":5357170,"avatar_url":"https://avatars.githubusercontent.com/u/5357170?v=3","gravatar_id":"","url":"https://api.github.com/users/petronny","html_url":"https://github.com/petronny","followers_url":"https://api.github.com/users/petronny/followers","following_url":"https://api.github.com/users/petronny/following{/other_user}","gists_url":"https://api.github.com/users/petronny/gists{/gist_id}","starred_url":"https://api.github.com/users/petronny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petronny/subscriptions","organizations_url":"https://api.github.com/users/petronny/orgs","repos_url":"https://api.github.com/users/petronny/repos","events_url":"https://api.github.com/users/petronny/events{/privacy}","received_events_url":"https://api.github.com/users/petronny/received_events","type":"User","site_admin":false},"body":"* b1ad968 is to prevent showing\r\n```\r\nI tensorflow/stream_executor/dso_loader.cc:116] successfully opened CUDA library libcublas.so locally\r\nI tensorflow/stream_executor/dso_loader.cc:116] successfully opened CUDA library libcudnn.so.5 locally\r\nI tensorflow/stream_executor/dso_loader.cc:116] successfully opened CUDA library libcufft.so locally\r\nI tensorflow/stream_executor/dso_loader.cc:116] successfully opened CUDA library libcuda.so.1 locally\r\nI tensorflow/stream_executor/dso_loader.cc:116] successfully opened CUDA library libcurand.so locally\r\n```\r\nwhen running `python neural_style.py --help`\r\n\r\n* 8d5e44c still has a problem to discuss. I will describe it in the reviews.","created_at":"2016-10-13T19:14:18Z","updated_at":"2016-10-20T17:16:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fefb467d2a6210429566a003407830cfcb9ba4b9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/anishathalye/neural-style/pulls/38/commits","review_comments_url":"https://api.github.com/repos/anishathalye/neural-style/pulls/38/comments","review_comment_url":"https://api.github.com/repos/anishathalye/neural-style/pulls/comments{/number}","comments_url":"https://api.github.com/repos/anishathalye/neural-style/issues/38/comments","statuses_url":"https://api.github.com/repos/anishathalye/neural-style/statuses/19b04792cc39d6dc6c5d7571d16952ddfa94f66b","head":{"label":"petronny:master","ref":"master","sha":"19b04792cc39d6dc6c5d7571d16952ddfa94f66b","user":{"login":"petronny","id":5357170,"avatar_url":"https://avatars.githubusercontent.com/u/5357170?v=3","gravatar_id":"","url":"https://api.github.com/users/petronny","html_url":"https://github.com/petronny","followers_url":"https://api.github.com/users/petronny/followers","following_url":"https://api.github.com/users/petronny/following{/other_user}","gists_url":"https://api.github.com/users/petronny/gists{/gist_id}","starred_url":"https://api.github.com/users/petronny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petronny/subscriptions","organizations_url":"https://api.github.com/users/petronny/orgs","repos_url":"https://api.github.com/users/petronny/repos","events_url":"https://api.github.com/users/petronny/events{/privacy}","received_events_url":"https://api.github.com/users/petronny/received_events","type":"User","site_admin":false},"repo":{"id":70818110,"name":"neural-style-tensorflow","full_name":"petronny/neural-style-tensorflow","owner":{"login":"petronny","id":5357170,"avatar_url":"https://avatars.githubusercontent.com/u/5357170?v=3","gravatar_id":"","url":"https://api.github.com/users/petronny","html_url":"https://github.com/petronny","followers_url":"https://api.github.com/users/petronny/followers","following_url":"https://api.github.com/users/petronny/following{/other_user}","gists_url":"https://api.github.com/users/petronny/gists{/gist_id}","starred_url":"https://api.github.com/users/petronny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petronny/subscriptions","organizations_url":"https://api.github.com/users/petronny/orgs","repos_url":"https://api.github.com/users/petronny/repos","events_url":"https://api.github.com/users/petronny/events{/privacy}","received_events_url":"https://api.github.com/users/petronny/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petronny/neural-style-tensorflow","description":"Neural style in TensorFlow! :art: (Added L-BFGS support)","fork":true,"url":"https://api.github.com/repos/petronny/neural-style-tensorflow","forks_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/forks","keys_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/teams","hooks_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/hooks","issue_events_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/issues/events{/number}","events_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/events","assignees_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/assignees{/user}","branches_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/branches{/branch}","tags_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/tags","blobs_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/statuses/{sha}","languages_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/languages","stargazers_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/stargazers","contributors_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/contributors","subscribers_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/subscribers","subscription_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/subscription","commits_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/contents/{+path}","compare_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/merges","archive_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/downloads","issues_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/issues{/number}","pulls_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/pulls{/number}","milestones_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/milestones{/number}","notifications_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/labels{/name}","releases_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/releases{/id}","deployments_url":"https://api.github.com/repos/petronny/neural-style-tensorflow/deployments","created_at":"2016-10-13T14:59:26Z","updated_at":"2016-10-16T08:15:42Z","pushed_at":"2016-10-13T19:37:13Z","git_url":"git://github.com/petronny/neural-style-tensorflow.git","ssh_url":"git@github.com:petronny/neural-style-tensorflow.git","clone_url":"https://github.com/petronny/neural-style-tensorflow.git","svn_url":"https://github.com/petronny/neural-style-tensorflow","homepage":"http://www.anishathalye.com/2015/12/19/an-ai-that-can-mimic-any-artist/","size":1870,"stargazers_count":1,"watchers_count":1,"language":"Python","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":1,"default_branch":"master"}},"base":{"label":"anishathalye:master","ref":"master","sha":"4122f1a2ddc3b588cfa9df42cdf1e45dbe75d6e5","user":{"login":"anishathalye","id":3526486,"avatar_url":"https://avatars.githubusercontent.com/u/3526486?v=3","gravatar_id":"","url":"https://api.github.com/users/anishathalye","html_url":"https://github.com/anishathalye","followers_url":"https://api.github.com/users/anishathalye/followers","following_url":"https://api.github.com/users/anishathalye/following{/other_user}","gists_url":"https://api.github.com/users/anishathalye/gists{/gist_id}","starred_url":"https://api.github.com/users/anishathalye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anishathalye/subscriptions","organizations_url":"https://api.github.com/users/anishathalye/orgs","repos_url":"https://api.github.com/users/anishathalye/repos","events_url":"https://api.github.com/users/anishathalye/events{/privacy}","received_events_url":"https://api.github.com/users/anishathalye/received_events","type":"User","site_admin":false},"repo":{"id":46638669,"name":"neural-style","full_name":"anishathalye/neural-style","owner":{"login":"anishathalye","id":3526486,"avatar_url":"https://avatars.githubusercontent.com/u/3526486?v=3","gravatar_id":"","url":"https://api.github.com/users/anishathalye","html_url":"https://github.com/anishathalye","followers_url":"https://api.github.com/users/anishathalye/followers","following_url":"https://api.github.com/users/anishathalye/following{/other_user}","gists_url":"https://api.github.com/users/anishathalye/gists{/gist_id}","starred_url":"https://api.github.com/users/anishathalye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anishathalye/subscriptions","organizations_url":"https://api.github.com/users/anishathalye/orgs","repos_url":"https://api.github.com/users/anishathalye/repos","events_url":"https://api.github.com/users/anishathalye/events{/privacy}","received_events_url":"https://api.github.com/users/anishathalye/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anishathalye/neural-style","description":"Neural style in TensorFlow! :art:","fork":false,"url":"https://api.github.com/repos/anishathalye/neural-style","forks_url":"https://api.github.com/repos/anishathalye/neural-style/forks","keys_url":"https://api.github.com/repos/anishathalye/neural-style/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anishathalye/neural-style/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anishathalye/neural-style/teams","hooks_url":"https://api.github.com/repos/anishathalye/neural-style/hooks","issue_events_url":"https://api.github.com/repos/anishathalye/neural-style/issues/events{/number}","events_url":"https://api.github.com/repos/anishathalye/neural-style/events","assignees_url":"https://api.github.com/repos/anishathalye/neural-style/assignees{/user}","branches_url":"https://api.github.com/repos/anishathalye/neural-style/branches{/branch}","tags_url":"https://api.github.com/repos/anishathalye/neural-style/tags","blobs_url":"https://api.github.com/repos/anishathalye/neural-style/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anishathalye/neural-style/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anishathalye/neural-style/git/refs{/sha}","trees_url":"https://api.github.com/repos/anishathalye/neural-style/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anishathalye/neural-style/statuses/{sha}","languages_url":"https://api.github.com/repos/anishathalye/neural-style/languages","stargazers_url":"https://api.github.com/repos/anishathalye/neural-style/stargazers","contributors_url":"https://api.github.com/repos/anishathalye/neural-style/contributors","subscribers_url":"https://api.github.com/repos/anishathalye/neural-style/subscribers","subscription_url":"https://api.github.com/repos/anishathalye/neural-style/subscription","commits_url":"https://api.github.com/repos/anishathalye/neural-style/commits{/sha}","git_commits_url":"https://api.github.com/repos/anishathalye/neural-style/git/commits{/sha}","comments_url":"https://api.github.com/repos/anishathalye/neural-style/comments{/number}","issue_comment_url":"https://api.github.com/repos/anishathalye/neural-style/issues/comments{/number}","contents_url":"https://api.github.com/repos/anishathalye/neural-style/contents/{+path}","compare_url":"https://api.github.com/repos/anishathalye/neural-style/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anishathalye/neural-style/merges","archive_url":"https://api.github.com/repos/anishathalye/neural-style/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anishathalye/neural-style/downloads","issues_url":"https://api.github.com/repos/anishathalye/neural-style/issues{/number}","pulls_url":"https://api.github.com/repos/anishathalye/neural-style/pulls{/number}","milestones_url":"https://api.github.com/repos/anishathalye/neural-style/milestones{/number}","notifications_url":"https://api.github.com/repos/anishathalye/neural-style/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anishathalye/neural-style/labels{/name}","releases_url":"https://api.github.com/repos/anishathalye/neural-style/releases{/id}","deployments_url":"https://api.github.com/repos/anishathalye/neural-style/deployments","created_at":"2015-11-21T23:40:00Z","updated_at":"2016-10-20T13:46:05Z","pushed_at":"2016-10-13T19:37:14Z","git_url":"git://github.com/anishathalye/neural-style.git","ssh_url":"git@github.com:anishathalye/neural-style.git","clone_url":"https://github.com/anishathalye/neural-style.git","svn_url":"https://github.com/anishathalye/neural-style","homepage":"http://www.anishathalye.com/2015/12/19/an-ai-that-can-mimic-any-artist/","size":2636,"stargazers_count":1319,"watchers_count":1319,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":280,"mirror_url":null,"open_issues_count":3,"forks":280,"open_issues":3,"watchers":1319,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/anishathalye/neural-style/pulls/38"},"html":{"href":"https://github.com/anishathalye/neural-style/pull/38"},"issue":{"href":"https://api.github.com/repos/anishathalye/neural-style/issues/38"},"comments":{"href":"https://api.github.com/repos/anishathalye/neural-style/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/anishathalye/neural-style/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/anishathalye/neural-style/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/anishathalye/neural-style/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/anishathalye/neural-style/statuses/19b04792cc39d6dc6c5d7571d16952ddfa94f66b"}}}}
{"actor":{"display_login":"anishathalye"}}