{"action":"created","comment":{"url":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls/comments/213867273","pull_request_review_id":150790064,"id":213867273,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzg2NzI3Mw==","diff_hunk":"@@ -36,16 +36,13 @@ def pelu(x):\n         return negative + positive\n \n \n-# https://stackoverflow.com/questions/39975676/how-to-implement-prelu-activation-in-tensorflow\n def prelu(_x):\n-    with tf.variable_scope(_x.op.name + '_activation', initializer=tf.constant_initializer(1.0)):\n-        alphas = tf.get_variable('alpha', _x.get_shape()[-1],\n-                           initializer=tf.constant_initializer(0.0),\n-                            dtype=tf.float32)\n-        pos = tf.nn.relu(_x)\n-        neg = alphas * (_x - abs(_x)) * 0.5\n-\n-        return pos + neg\n+    \"\"\"\n+    :param _x: Tensor of shape [batch_size, H, W, C].\n+    :return: Prelu'd tensor of shape [batch_size, H, W, C].\n+    \"\"\"\n+    layer = tf.keras.layers.PReLU(shared_axes=[1, 2])","path":"common/utils/tf.py","position":18,"original_position":18,"commit_id":"3f06d3255c69a5f24affaf2ca7ac2c607393994e","original_commit_id":"3f06d3255c69a5f24affaf2ca7ac2c607393994e","user":{"login":"NeedsMorePie","id":9463598,"node_id":"MDQ6VXNlcjk0NjM1OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9463598?v=4","gravatar_id":"","url":"https://api.github.com/users/NeedsMorePie","html_url":"https://github.com/NeedsMorePie","followers_url":"https://api.github.com/users/NeedsMorePie/followers","following_url":"https://api.github.com/users/NeedsMorePie/following{/other_user}","gists_url":"https://api.github.com/users/NeedsMorePie/gists{/gist_id}","starred_url":"https://api.github.com/users/NeedsMorePie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeedsMorePie/subscriptions","organizations_url":"https://api.github.com/users/NeedsMorePie/orgs","repos_url":"https://api.github.com/users/NeedsMorePie/repos","events_url":"https://api.github.com/users/NeedsMorePie/events{/privacy}","received_events_url":"https://api.github.com/users/NeedsMorePie/received_events","type":"User","site_admin":false},"body":"Do we intentionally not regularize the alpha?","created_at":"2018-08-29T23:41:12Z","updated_at":"2018-08-29T23:41:37Z","html_url":"https://github.com/NeedsMorePie/interpolator/pull/46#discussion_r213867273","pull_request_url":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls/46","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls/comments/213867273"},"html":{"href":"https://github.com/NeedsMorePie/interpolator/pull/46#discussion_r213867273"},"pull_request":{"href":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls/46","id":211877507,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExODc3NTA3","html_url":"https://github.com/NeedsMorePie/interpolator/pull/46","diff_url":"https://github.com/NeedsMorePie/interpolator/pull/46.diff","patch_url":"https://github.com/NeedsMorePie/interpolator/pull/46.patch","issue_url":"https://api.github.com/repos/NeedsMorePie/interpolator/issues/46","number":46,"state":"open","locked":false,"title":"Fixes #45. Switched to tf.keras.layers implementation of PReLU to fix…","user":{"login":"boxofpasta","id":16711866,"node_id":"MDQ6VXNlcjE2NzExODY2","avatar_url":"https://avatars2.githubusercontent.com/u/16711866?v=4","gravatar_id":"","url":"https://api.github.com/users/boxofpasta","html_url":"https://github.com/boxofpasta","followers_url":"https://api.github.com/users/boxofpasta/followers","following_url":"https://api.github.com/users/boxofpasta/following{/other_user}","gists_url":"https://api.github.com/users/boxofpasta/gists{/gist_id}","starred_url":"https://api.github.com/users/boxofpasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boxofpasta/subscriptions","organizations_url":"https://api.github.com/users/boxofpasta/orgs","repos_url":"https://api.github.com/users/boxofpasta/repos","events_url":"https://api.github.com/users/boxofpasta/events{/privacy}","received_events_url":"https://api.github.com/users/boxofpasta/received_events","type":"User","site_admin":false},"body":"Fixes #45. The issue was that the PReLU implementation we used named variables based on the op name of the input, which changes when creating a new network to stay unique. These variable naming issues are resolved by the Layer class from which keras' PReLU inherits, so I switched to it.","created_at":"2018-08-29T20:29:07Z","updated_at":"2018-08-29T23:41:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23f8a5d007444637542f6282fd740ecf31fc61f7","assignee":{"login":"NeedsMorePie","id":9463598,"node_id":"MDQ6VXNlcjk0NjM1OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9463598?v=4","gravatar_id":"","url":"https://api.github.com/users/NeedsMorePie","html_url":"https://github.com/NeedsMorePie","followers_url":"https://api.github.com/users/NeedsMorePie/followers","following_url":"https://api.github.com/users/NeedsMorePie/following{/other_user}","gists_url":"https://api.github.com/users/NeedsMorePie/gists{/gist_id}","starred_url":"https://api.github.com/users/NeedsMorePie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeedsMorePie/subscriptions","organizations_url":"https://api.github.com/users/NeedsMorePie/orgs","repos_url":"https://api.github.com/users/NeedsMorePie/repos","events_url":"https://api.github.com/users/NeedsMorePie/events{/privacy}","received_events_url":"https://api.github.com/users/NeedsMorePie/received_events","type":"User","site_admin":false},"assignees":[{"login":"NeedsMorePie","id":9463598,"node_id":"MDQ6VXNlcjk0NjM1OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9463598?v=4","gravatar_id":"","url":"https://api.github.com/users/NeedsMorePie","html_url":"https://github.com/NeedsMorePie","followers_url":"https://api.github.com/users/NeedsMorePie/followers","following_url":"https://api.github.com/users/NeedsMorePie/following{/other_user}","gists_url":"https://api.github.com/users/NeedsMorePie/gists{/gist_id}","starred_url":"https://api.github.com/users/NeedsMorePie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeedsMorePie/subscriptions","organizations_url":"https://api.github.com/users/NeedsMorePie/orgs","repos_url":"https://api.github.com/users/NeedsMorePie/repos","events_url":"https://api.github.com/users/NeedsMorePie/events{/privacy}","received_events_url":"https://api.github.com/users/NeedsMorePie/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls/46/commits","review_comments_url":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls/46/comments","review_comment_url":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NeedsMorePie/interpolator/issues/46/comments","statuses_url":"https://api.github.com/repos/NeedsMorePie/interpolator/statuses/3f06d3255c69a5f24affaf2ca7ac2c607393994e","head":{"label":"NeedsMorePie:context-interp-reuse-fix","ref":"context-interp-reuse-fix","sha":"3f06d3255c69a5f24affaf2ca7ac2c607393994e","user":{"login":"NeedsMorePie","id":9463598,"node_id":"MDQ6VXNlcjk0NjM1OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9463598?v=4","gravatar_id":"","url":"https://api.github.com/users/NeedsMorePie","html_url":"https://github.com/NeedsMorePie","followers_url":"https://api.github.com/users/NeedsMorePie/followers","following_url":"https://api.github.com/users/NeedsMorePie/following{/other_user}","gists_url":"https://api.github.com/users/NeedsMorePie/gists{/gist_id}","starred_url":"https://api.github.com/users/NeedsMorePie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeedsMorePie/subscriptions","organizations_url":"https://api.github.com/users/NeedsMorePie/orgs","repos_url":"https://api.github.com/users/NeedsMorePie/repos","events_url":"https://api.github.com/users/NeedsMorePie/events{/privacy}","received_events_url":"https://api.github.com/users/NeedsMorePie/received_events","type":"User","site_admin":false},"repo":{"id":132954308,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI5NTQzMDg=","name":"interpolator","full_name":"NeedsMorePie/interpolator","owner":{"login":"NeedsMorePie","id":9463598,"node_id":"MDQ6VXNlcjk0NjM1OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9463598?v=4","gravatar_id":"","url":"https://api.github.com/users/NeedsMorePie","html_url":"https://github.com/NeedsMorePie","followers_url":"https://api.github.com/users/NeedsMorePie/followers","following_url":"https://api.github.com/users/NeedsMorePie/following{/other_user}","gists_url":"https://api.github.com/users/NeedsMorePie/gists{/gist_id}","starred_url":"https://api.github.com/users/NeedsMorePie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeedsMorePie/subscriptions","organizations_url":"https://api.github.com/users/NeedsMorePie/orgs","repos_url":"https://api.github.com/users/NeedsMorePie/repos","events_url":"https://api.github.com/users/NeedsMorePie/events{/privacy}","received_events_url":"https://api.github.com/users/NeedsMorePie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NeedsMorePie/interpolator","description":"2D Frame Inbetweening","fork":false,"url":"https://api.github.com/repos/NeedsMorePie/interpolator","forks_url":"https://api.github.com/repos/NeedsMorePie/interpolator/forks","keys_url":"https://api.github.com/repos/NeedsMorePie/interpolator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NeedsMorePie/interpolator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NeedsMorePie/interpolator/teams","hooks_url":"https://api.github.com/repos/NeedsMorePie/interpolator/hooks","issue_events_url":"https://api.github.com/repos/NeedsMorePie/interpolator/issues/events{/number}","events_url":"https://api.github.com/repos/NeedsMorePie/interpolator/events","assignees_url":"https://api.github.com/repos/NeedsMorePie/interpolator/assignees{/user}","branches_url":"https://api.github.com/repos/NeedsMorePie/interpolator/branches{/branch}","tags_url":"https://api.github.com/repos/NeedsMorePie/interpolator/tags","blobs_url":"https://api.github.com/repos/NeedsMorePie/interpolator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NeedsMorePie/interpolator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NeedsMorePie/interpolator/git/refs{/sha}","trees_url":"https://api.github.com/repos/NeedsMorePie/interpolator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NeedsMorePie/interpolator/statuses/{sha}","languages_url":"https://api.github.com/repos/NeedsMorePie/interpolator/languages","stargazers_url":"https://api.github.com/repos/NeedsMorePie/interpolator/stargazers","contributors_url":"https://api.github.com/repos/NeedsMorePie/interpolator/contributors","subscribers_url":"https://api.github.com/repos/NeedsMorePie/interpolator/subscribers","subscription_url":"https://api.github.com/repos/NeedsMorePie/interpolator/subscription","commits_url":"https://api.github.com/repos/NeedsMorePie/interpolator/commits{/sha}","git_commits_url":"https://api.github.com/repos/NeedsMorePie/interpolator/git/commits{/sha}","comments_url":"https://api.github.com/repos/NeedsMorePie/interpolator/comments{/number}","issue_comment_url":"https://api.github.com/repos/NeedsMorePie/interpolator/issues/comments{/number}","contents_url":"https://api.github.com/repos/NeedsMorePie/interpolator/contents/{+path}","compare_url":"https://api.github.com/repos/NeedsMorePie/interpolator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NeedsMorePie/interpolator/merges","archive_url":"https://api.github.com/repos/NeedsMorePie/interpolator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NeedsMorePie/interpolator/downloads","issues_url":"https://api.github.com/repos/NeedsMorePie/interpolator/issues{/number}","pulls_url":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls{/number}","milestones_url":"https://api.github.com/repos/NeedsMorePie/interpolator/milestones{/number}","notifications_url":"https://api.github.com/repos/NeedsMorePie/interpolator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NeedsMorePie/interpolator/labels{/name}","releases_url":"https://api.github.com/repos/NeedsMorePie/interpolator/releases{/id}","deployments_url":"https://api.github.com/repos/NeedsMorePie/interpolator/deployments","created_at":"2018-05-10T21:05:29Z","updated_at":"2018-08-29T07:03:56Z","pushed_at":"2018-08-29T20:29:08Z","git_url":"git://github.com/NeedsMorePie/interpolator.git","ssh_url":"git@github.com:NeedsMorePie/interpolator.git","clone_url":"https://github.com/NeedsMorePie/interpolator.git","svn_url":"https://github.com/NeedsMorePie/interpolator","homepage":"","size":8488,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"NeedsMorePie:unflow-dev","ref":"unflow-dev","sha":"abd772c278ee07f049d074f2ea18d439bf7a57c7","user":{"login":"NeedsMorePie","id":9463598,"node_id":"MDQ6VXNlcjk0NjM1OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9463598?v=4","gravatar_id":"","url":"https://api.github.com/users/NeedsMorePie","html_url":"https://github.com/NeedsMorePie","followers_url":"https://api.github.com/users/NeedsMorePie/followers","following_url":"https://api.github.com/users/NeedsMorePie/following{/other_user}","gists_url":"https://api.github.com/users/NeedsMorePie/gists{/gist_id}","starred_url":"https://api.github.com/users/NeedsMorePie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeedsMorePie/subscriptions","organizations_url":"https://api.github.com/users/NeedsMorePie/orgs","repos_url":"https://api.github.com/users/NeedsMorePie/repos","events_url":"https://api.github.com/users/NeedsMorePie/events{/privacy}","received_events_url":"https://api.github.com/users/NeedsMorePie/received_events","type":"User","site_admin":false},"repo":{"id":132954308,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI5NTQzMDg=","name":"interpolator","full_name":"NeedsMorePie/interpolator","owner":{"login":"NeedsMorePie","id":9463598,"node_id":"MDQ6VXNlcjk0NjM1OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9463598?v=4","gravatar_id":"","url":"https://api.github.com/users/NeedsMorePie","html_url":"https://github.com/NeedsMorePie","followers_url":"https://api.github.com/users/NeedsMorePie/followers","following_url":"https://api.github.com/users/NeedsMorePie/following{/other_user}","gists_url":"https://api.github.com/users/NeedsMorePie/gists{/gist_id}","starred_url":"https://api.github.com/users/NeedsMorePie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeedsMorePie/subscriptions","organizations_url":"https://api.github.com/users/NeedsMorePie/orgs","repos_url":"https://api.github.com/users/NeedsMorePie/repos","events_url":"https://api.github.com/users/NeedsMorePie/events{/privacy}","received_events_url":"https://api.github.com/users/NeedsMorePie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NeedsMorePie/interpolator","description":"2D Frame Inbetweening","fork":false,"url":"https://api.github.com/repos/NeedsMorePie/interpolator","forks_url":"https://api.github.com/repos/NeedsMorePie/interpolator/forks","keys_url":"https://api.github.com/repos/NeedsMorePie/interpolator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NeedsMorePie/interpolator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NeedsMorePie/interpolator/teams","hooks_url":"https://api.github.com/repos/NeedsMorePie/interpolator/hooks","issue_events_url":"https://api.github.com/repos/NeedsMorePie/interpolator/issues/events{/number}","events_url":"https://api.github.com/repos/NeedsMorePie/interpolator/events","assignees_url":"https://api.github.com/repos/NeedsMorePie/interpolator/assignees{/user}","branches_url":"https://api.github.com/repos/NeedsMorePie/interpolator/branches{/branch}","tags_url":"https://api.github.com/repos/NeedsMorePie/interpolator/tags","blobs_url":"https://api.github.com/repos/NeedsMorePie/interpolator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NeedsMorePie/interpolator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NeedsMorePie/interpolator/git/refs{/sha}","trees_url":"https://api.github.com/repos/NeedsMorePie/interpolator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NeedsMorePie/interpolator/statuses/{sha}","languages_url":"https://api.github.com/repos/NeedsMorePie/interpolator/languages","stargazers_url":"https://api.github.com/repos/NeedsMorePie/interpolator/stargazers","contributors_url":"https://api.github.com/repos/NeedsMorePie/interpolator/contributors","subscribers_url":"https://api.github.com/repos/NeedsMorePie/interpolator/subscribers","subscription_url":"https://api.github.com/repos/NeedsMorePie/interpolator/subscription","commits_url":"https://api.github.com/repos/NeedsMorePie/interpolator/commits{/sha}","git_commits_url":"https://api.github.com/repos/NeedsMorePie/interpolator/git/commits{/sha}","comments_url":"https://api.github.com/repos/NeedsMorePie/interpolator/comments{/number}","issue_comment_url":"https://api.github.com/repos/NeedsMorePie/interpolator/issues/comments{/number}","contents_url":"https://api.github.com/repos/NeedsMorePie/interpolator/contents/{+path}","compare_url":"https://api.github.com/repos/NeedsMorePie/interpolator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NeedsMorePie/interpolator/merges","archive_url":"https://api.github.com/repos/NeedsMorePie/interpolator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NeedsMorePie/interpolator/downloads","issues_url":"https://api.github.com/repos/NeedsMorePie/interpolator/issues{/number}","pulls_url":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls{/number}","milestones_url":"https://api.github.com/repos/NeedsMorePie/interpolator/milestones{/number}","notifications_url":"https://api.github.com/repos/NeedsMorePie/interpolator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NeedsMorePie/interpolator/labels{/name}","releases_url":"https://api.github.com/repos/NeedsMorePie/interpolator/releases{/id}","deployments_url":"https://api.github.com/repos/NeedsMorePie/interpolator/deployments","created_at":"2018-05-10T21:05:29Z","updated_at":"2018-08-29T07:03:56Z","pushed_at":"2018-08-29T20:29:08Z","git_url":"git://github.com/NeedsMorePie/interpolator.git","ssh_url":"git@github.com:NeedsMorePie/interpolator.git","clone_url":"https://github.com/NeedsMorePie/interpolator.git","svn_url":"https://github.com/NeedsMorePie/interpolator","homepage":"","size":8488,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls/46"},"html":{"href":"https://github.com/NeedsMorePie/interpolator/pull/46"},"issue":{"href":"https://api.github.com/repos/NeedsMorePie/interpolator/issues/46"},"comments":{"href":"https://api.github.com/repos/NeedsMorePie/interpolator/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NeedsMorePie/interpolator/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/NeedsMorePie/interpolator/statuses/3f06d3255c69a5f24affaf2ca7ac2c607393994e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"NeedsMorePie"}}