{"action":"created","comment":{"url":"https://api.github.com/repos/baidu/Paddle/pulls/comments/85759504","pull_request_review_id":6436910,"id":85759504,"diff_hunk":"@@ -1257,6 +1258,70 @@ def interpolation_layer(input, weight, name=None, layer_attr=None):\n \n @wrap_name_default()\n @layer_support()\n+def bilinear_interp_layer(input,\n+                          img_size_x=None,   \n+                          img_size_y=None,\n+                          out_size_x=None,\n+                          out_size_y=None,\n+                          num_channels=None,\n+                          name=None,\n+                          layer_attr=None):\n+    \"\"\"\n+    This layer is to implement bilinear interpolation on conv layer output.\n+\n+    Please refer to Wikipedia: https://en.wikipedia.org/wiki/Bilinear_interpolation\n+\n+    The simple usage is:\n+\n+    .. code-block:: python\n+\n+       bilinear = bilinear_interp_layer(input,\n+                                        img_size_x,\n+                                        img_size_y,\n+                                        out_size_x,\n+                                        out_size_y,\n+                                        num_channels)\n+    \n+    :para    input:        A input layer.\n+    :type    input:        LayerOutput.\n+    :para    img_size_x:   previous layer output width.\n+    :type    img_size_x:   int|None \n+    :para    img_size_y:   previous layer output height.\n+    :type    img_size_y:   int|None\n+    :para    out_size_x:   bilinear interpolation output width.\n+    :type    out_size_x:   int|None \n+    :para    out_size_y:   bilinear interpolation output height.\n+    :type    out_size_y:   int|None\n+    :para    num_channels: number of channels of input layer. If None,\n+                           it will be set automatically from previous output.\n+    :type    num_channels: int|None\n+    :para    name:         The layer's name, which cna not be specified.\n+    :type    name:         None|basestring\n+    :para    layer_attr:   Extra Layer attribute.\n+    :type    layer_attr:   ExtraLayerAttribute\n+    :return: LayerOutput object.\n+    :rtype:  LayerOutput\n+    \"\"\"\n+    assert input.layer_type == LayerType.CONV_LAYER\n+    assert isinstance(input.activation, LinearActivation)\n+    assert img_size_x > 0 and img_size_y > 0\n+    assert out_size_x > 0 and out_size_y > 0\n+    if num_channels is None:\n+        assert input.numfilters is not None\n+        num_channels = input.num_filters\n+    Layer(name=name,\n+          inputs=Input(input.name,\n+                       bilinear_interp=BilinearInterp(img_size_x=img_size_x,\n+                                                      img_size_y=img_size_y,\n+                                                      out_size_x=out_size_x,\n+                                                      out_size_y=out_size_y,\n+                                                      num_channels=num_channels)),\n+          type=LayerType.BILINEAR_INTERP_LAYER,\n+          **ExtraLayerAttribute.to_kwargs(layer_attr))\n+    return LayerOutput(name, LayerType.BILINEAR_INTERP_LAYER, parents=[input])","path":"python/paddle/trainer_config_helpers/layers.py","position":83,"original_position":83,"commit_id":"460320a41c24c6f1150bd4d9a9e499474ca28935","original_commit_id":"460320a41c24c6f1150bd4d9a9e499474ca28935","user":{"login":"qingqing01","id":7845005,"avatar_url":"https://avatars.githubusercontent.com/u/7845005?v=3","gravatar_id":"","url":"https://api.github.com/users/qingqing01","html_url":"https://github.com/qingqing01","followers_url":"https://api.github.com/users/qingqing01/followers","following_url":"https://api.github.com/users/qingqing01/following{/other_user}","gists_url":"https://api.github.com/users/qingqing01/gists{/gist_id}","starred_url":"https://api.github.com/users/qingqing01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qingqing01/subscriptions","organizations_url":"https://api.github.com/users/qingqing01/orgs","repos_url":"https://api.github.com/users/qingqing01/repos","events_url":"https://api.github.com/users/qingqing01/events{/privacy}","received_events_url":"https://api.github.com/users/qingqing01/received_events","type":"User","site_admin":false},"body":"LayerOutput里需要设置num_filters， 同样maxout里应该也需要，@LuoTao确定，可以一起补上。","created_at":"2016-10-31T15:14:00Z","updated_at":"2016-10-31T15:22:49Z","html_url":"https://github.com/baidu/Paddle/pull/287#discussion_r85759504","pull_request_url":"https://api.github.com/repos/baidu/Paddle/pulls/287","_links":{"self":{"href":"https://api.github.com/repos/baidu/Paddle/pulls/comments/85759504"},"html":{"href":"https://github.com/baidu/Paddle/pull/287#discussion_r85759504"},"pull_request":{"href":"https://api.github.com/repos/baidu/Paddle/pulls/287"}}},"pull_request":{"url":"https://api.github.com/repos/baidu/Paddle/pulls/287","id":91507975,"html_url":"https://github.com/baidu/Paddle/pull/287","diff_url":"https://github.com/baidu/Paddle/pull/287.diff","patch_url":"https://github.com/baidu/Paddle/pull/287.patch","issue_url":"https://api.github.com/repos/baidu/Paddle/issues/287","number":287,"state":"open","locked":false,"title":"Add bilinear interpolation layer","user":{"login":"gangliao","id":3071933,"avatar_url":"https://avatars.githubusercontent.com/u/3071933?v=3","gravatar_id":"","url":"https://api.github.com/users/gangliao","html_url":"https://github.com/gangliao","followers_url":"https://api.github.com/users/gangliao/followers","following_url":"https://api.github.com/users/gangliao/following{/other_user}","gists_url":"https://api.github.com/users/gangliao/gists{/gist_id}","starred_url":"https://api.github.com/users/gangliao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gangliao/subscriptions","organizations_url":"https://api.github.com/users/gangliao/orgs","repos_url":"https://api.github.com/users/gangliao/repos","events_url":"https://api.github.com/users/gangliao/events{/privacy}","received_events_url":"https://api.github.com/users/gangliao/received_events","type":"User","site_admin":false},"body":"Support bi-linear interpolation operation. #256","created_at":"2016-10-30T01:41:07Z","updated_at":"2016-10-31T15:22:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3af1fa2bafb707b68d0c5fd7fbe79e45b2f8953","assignee":{"login":"luotao1","id":6836917,"avatar_url":"https://avatars.githubusercontent.com/u/6836917?v=3","gravatar_id":"","url":"https://api.github.com/users/luotao1","html_url":"https://github.com/luotao1","followers_url":"https://api.github.com/users/luotao1/followers","following_url":"https://api.github.com/users/luotao1/following{/other_user}","gists_url":"https://api.github.com/users/luotao1/gists{/gist_id}","starred_url":"https://api.github.com/users/luotao1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luotao1/subscriptions","organizations_url":"https://api.github.com/users/luotao1/orgs","repos_url":"https://api.github.com/users/luotao1/repos","events_url":"https://api.github.com/users/luotao1/events{/privacy}","received_events_url":"https://api.github.com/users/luotao1/received_events","type":"User","site_admin":false},"assignees":[{"login":"luotao1","id":6836917,"avatar_url":"https://avatars.githubusercontent.com/u/6836917?v=3","gravatar_id":"","url":"https://api.github.com/users/luotao1","html_url":"https://github.com/luotao1","followers_url":"https://api.github.com/users/luotao1/followers","following_url":"https://api.github.com/users/luotao1/following{/other_user}","gists_url":"https://api.github.com/users/luotao1/gists{/gist_id}","starred_url":"https://api.github.com/users/luotao1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luotao1/subscriptions","organizations_url":"https://api.github.com/users/luotao1/orgs","repos_url":"https://api.github.com/users/luotao1/repos","events_url":"https://api.github.com/users/luotao1/events{/privacy}","received_events_url":"https://api.github.com/users/luotao1/received_events","type":"User","site_admin":false},{"login":"qingqing01","id":7845005,"avatar_url":"https://avatars.githubusercontent.com/u/7845005?v=3","gravatar_id":"","url":"https://api.github.com/users/qingqing01","html_url":"https://github.com/qingqing01","followers_url":"https://api.github.com/users/qingqing01/followers","following_url":"https://api.github.com/users/qingqing01/following{/other_user}","gists_url":"https://api.github.com/users/qingqing01/gists{/gist_id}","starred_url":"https://api.github.com/users/qingqing01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qingqing01/subscriptions","organizations_url":"https://api.github.com/users/qingqing01/orgs","repos_url":"https://api.github.com/users/qingqing01/repos","events_url":"https://api.github.com/users/qingqing01/events{/privacy}","received_events_url":"https://api.github.com/users/qingqing01/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/baidu/Paddle/milestones/1","html_url":"https://github.com/baidu/Paddle/milestones/0.8.1","labels_url":"https://api.github.com/repos/baidu/Paddle/milestones/1/labels","id":2094009,"number":1,"title":"0.8.1","description":"","creator":{"login":"wangkuiyi","id":1548775,"avatar_url":"https://avatars.githubusercontent.com/u/1548775?v=3","gravatar_id":"","url":"https://api.github.com/users/wangkuiyi","html_url":"https://github.com/wangkuiyi","followers_url":"https://api.github.com/users/wangkuiyi/followers","following_url":"https://api.github.com/users/wangkuiyi/following{/other_user}","gists_url":"https://api.github.com/users/wangkuiyi/gists{/gist_id}","starred_url":"https://api.github.com/users/wangkuiyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangkuiyi/subscriptions","organizations_url":"https://api.github.com/users/wangkuiyi/orgs","repos_url":"https://api.github.com/users/wangkuiyi/repos","events_url":"https://api.github.com/users/wangkuiyi/events{/privacy}","received_events_url":"https://api.github.com/users/wangkuiyi/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":7,"state":"open","created_at":"2016-10-26T05:21:24Z","updated_at":"2016-10-31T13:55:39Z","due_on":"2016-11-09T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/baidu/Paddle/pulls/287/commits","review_comments_url":"https://api.github.com/repos/baidu/Paddle/pulls/287/comments","review_comment_url":"https://api.github.com/repos/baidu/Paddle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/baidu/Paddle/issues/287/comments","statuses_url":"https://api.github.com/repos/baidu/Paddle/statuses/460320a41c24c6f1150bd4d9a9e499474ca28935","head":{"label":"gangliao:bilinear","ref":"bilinear","sha":"460320a41c24c6f1150bd4d9a9e499474ca28935","user":{"login":"gangliao","id":3071933,"avatar_url":"https://avatars.githubusercontent.com/u/3071933?v=3","gravatar_id":"","url":"https://api.github.com/users/gangliao","html_url":"https://github.com/gangliao","followers_url":"https://api.github.com/users/gangliao/followers","following_url":"https://api.github.com/users/gangliao/following{/other_user}","gists_url":"https://api.github.com/users/gangliao/gists{/gist_id}","starred_url":"https://api.github.com/users/gangliao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gangliao/subscriptions","organizations_url":"https://api.github.com/users/gangliao/orgs","repos_url":"https://api.github.com/users/gangliao/repos","events_url":"https://api.github.com/users/gangliao/events{/privacy}","received_events_url":"https://api.github.com/users/gangliao/received_events","type":"User","site_admin":false},"repo":{"id":70446195,"name":"Paddle","full_name":"gangliao/Paddle","owner":{"login":"gangliao","id":3071933,"avatar_url":"https://avatars.githubusercontent.com/u/3071933?v=3","gravatar_id":"","url":"https://api.github.com/users/gangliao","html_url":"https://github.com/gangliao","followers_url":"https://api.github.com/users/gangliao/followers","following_url":"https://api.github.com/users/gangliao/following{/other_user}","gists_url":"https://api.github.com/users/gangliao/gists{/gist_id}","starred_url":"https://api.github.com/users/gangliao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gangliao/subscriptions","organizations_url":"https://api.github.com/users/gangliao/orgs","repos_url":"https://api.github.com/users/gangliao/repos","events_url":"https://api.github.com/users/gangliao/events{/privacy}","received_events_url":"https://api.github.com/users/gangliao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gangliao/Paddle","description":"PArallel Distributed Deep LEarning","fork":true,"url":"https://api.github.com/repos/gangliao/Paddle","forks_url":"https://api.github.com/repos/gangliao/Paddle/forks","keys_url":"https://api.github.com/repos/gangliao/Paddle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gangliao/Paddle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gangliao/Paddle/teams","hooks_url":"https://api.github.com/repos/gangliao/Paddle/hooks","issue_events_url":"https://api.github.com/repos/gangliao/Paddle/issues/events{/number}","events_url":"https://api.github.com/repos/gangliao/Paddle/events","assignees_url":"https://api.github.com/repos/gangliao/Paddle/assignees{/user}","branches_url":"https://api.github.com/repos/gangliao/Paddle/branches{/branch}","tags_url":"https://api.github.com/repos/gangliao/Paddle/tags","blobs_url":"https://api.github.com/repos/gangliao/Paddle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gangliao/Paddle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gangliao/Paddle/git/refs{/sha}","trees_url":"https://api.github.com/repos/gangliao/Paddle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gangliao/Paddle/statuses/{sha}","languages_url":"https://api.github.com/repos/gangliao/Paddle/languages","stargazers_url":"https://api.github.com/repos/gangliao/Paddle/stargazers","contributors_url":"https://api.github.com/repos/gangliao/Paddle/contributors","subscribers_url":"https://api.github.com/repos/gangliao/Paddle/subscribers","subscription_url":"https://api.github.com/repos/gangliao/Paddle/subscription","commits_url":"https://api.github.com/repos/gangliao/Paddle/commits{/sha}","git_commits_url":"https://api.github.com/repos/gangliao/Paddle/git/commits{/sha}","comments_url":"https://api.github.com/repos/gangliao/Paddle/comments{/number}","issue_comment_url":"https://api.github.com/repos/gangliao/Paddle/issues/comments{/number}","contents_url":"https://api.github.com/repos/gangliao/Paddle/contents/{+path}","compare_url":"https://api.github.com/repos/gangliao/Paddle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gangliao/Paddle/merges","archive_url":"https://api.github.com/repos/gangliao/Paddle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gangliao/Paddle/downloads","issues_url":"https://api.github.com/repos/gangliao/Paddle/issues{/number}","pulls_url":"https://api.github.com/repos/gangliao/Paddle/pulls{/number}","milestones_url":"https://api.github.com/repos/gangliao/Paddle/milestones{/number}","notifications_url":"https://api.github.com/repos/gangliao/Paddle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gangliao/Paddle/labels{/name}","releases_url":"https://api.github.com/repos/gangliao/Paddle/releases{/id}","deployments_url":"https://api.github.com/repos/gangliao/Paddle/deployments","created_at":"2016-10-10T02:50:18Z","updated_at":"2016-10-23T03:44:47Z","pushed_at":"2016-10-31T15:15:12Z","git_url":"git://github.com/gangliao/Paddle.git","ssh_url":"git@github.com:gangliao/Paddle.git","clone_url":"https://github.com/gangliao/Paddle.git","svn_url":"https://github.com/gangliao/Paddle","homepage":"http://www.paddlepaddle.org/","size":10605,"stargazers_count":1,"watchers_count":1,"language":"C++","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":"baidu:develop","ref":"develop","sha":"fa24cbdbe1b18649a9140152b971473ba99079f7","user":{"login":"baidu","id":13245940,"avatar_url":"https://avatars.githubusercontent.com/u/13245940?v=3","gravatar_id":"","url":"https://api.github.com/users/baidu","html_url":"https://github.com/baidu","followers_url":"https://api.github.com/users/baidu/followers","following_url":"https://api.github.com/users/baidu/following{/other_user}","gists_url":"https://api.github.com/users/baidu/gists{/gist_id}","starred_url":"https://api.github.com/users/baidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baidu/subscriptions","organizations_url":"https://api.github.com/users/baidu/orgs","repos_url":"https://api.github.com/users/baidu/repos","events_url":"https://api.github.com/users/baidu/events{/privacy}","received_events_url":"https://api.github.com/users/baidu/received_events","type":"Organization","site_admin":false},"repo":{"id":65711522,"name":"Paddle","full_name":"baidu/Paddle","owner":{"login":"baidu","id":13245940,"avatar_url":"https://avatars.githubusercontent.com/u/13245940?v=3","gravatar_id":"","url":"https://api.github.com/users/baidu","html_url":"https://github.com/baidu","followers_url":"https://api.github.com/users/baidu/followers","following_url":"https://api.github.com/users/baidu/following{/other_user}","gists_url":"https://api.github.com/users/baidu/gists{/gist_id}","starred_url":"https://api.github.com/users/baidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baidu/subscriptions","organizations_url":"https://api.github.com/users/baidu/orgs","repos_url":"https://api.github.com/users/baidu/repos","events_url":"https://api.github.com/users/baidu/events{/privacy}","received_events_url":"https://api.github.com/users/baidu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/baidu/Paddle","description":"PArallel Distributed Deep LEarning","fork":false,"url":"https://api.github.com/repos/baidu/Paddle","forks_url":"https://api.github.com/repos/baidu/Paddle/forks","keys_url":"https://api.github.com/repos/baidu/Paddle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baidu/Paddle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baidu/Paddle/teams","hooks_url":"https://api.github.com/repos/baidu/Paddle/hooks","issue_events_url":"https://api.github.com/repos/baidu/Paddle/issues/events{/number}","events_url":"https://api.github.com/repos/baidu/Paddle/events","assignees_url":"https://api.github.com/repos/baidu/Paddle/assignees{/user}","branches_url":"https://api.github.com/repos/baidu/Paddle/branches{/branch}","tags_url":"https://api.github.com/repos/baidu/Paddle/tags","blobs_url":"https://api.github.com/repos/baidu/Paddle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baidu/Paddle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baidu/Paddle/git/refs{/sha}","trees_url":"https://api.github.com/repos/baidu/Paddle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baidu/Paddle/statuses/{sha}","languages_url":"https://api.github.com/repos/baidu/Paddle/languages","stargazers_url":"https://api.github.com/repos/baidu/Paddle/stargazers","contributors_url":"https://api.github.com/repos/baidu/Paddle/contributors","subscribers_url":"https://api.github.com/repos/baidu/Paddle/subscribers","subscription_url":"https://api.github.com/repos/baidu/Paddle/subscription","commits_url":"https://api.github.com/repos/baidu/Paddle/commits{/sha}","git_commits_url":"https://api.github.com/repos/baidu/Paddle/git/commits{/sha}","comments_url":"https://api.github.com/repos/baidu/Paddle/comments{/number}","issue_comment_url":"https://api.github.com/repos/baidu/Paddle/issues/comments{/number}","contents_url":"https://api.github.com/repos/baidu/Paddle/contents/{+path}","compare_url":"https://api.github.com/repos/baidu/Paddle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baidu/Paddle/merges","archive_url":"https://api.github.com/repos/baidu/Paddle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baidu/Paddle/downloads","issues_url":"https://api.github.com/repos/baidu/Paddle/issues{/number}","pulls_url":"https://api.github.com/repos/baidu/Paddle/pulls{/number}","milestones_url":"https://api.github.com/repos/baidu/Paddle/milestones{/number}","notifications_url":"https://api.github.com/repos/baidu/Paddle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baidu/Paddle/labels{/name}","releases_url":"https://api.github.com/repos/baidu/Paddle/releases{/id}","deployments_url":"https://api.github.com/repos/baidu/Paddle/deployments","created_at":"2016-08-15T06:59:08Z","updated_at":"2016-10-31T15:19:59Z","pushed_at":"2016-10-31T15:17:21Z","git_url":"git://github.com/baidu/Paddle.git","ssh_url":"git@github.com:baidu/Paddle.git","clone_url":"https://github.com/baidu/Paddle.git","svn_url":"https://github.com/baidu/Paddle","homepage":"http://www.paddlepaddle.org/","size":18019,"stargazers_count":3684,"watchers_count":3684,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":833,"mirror_url":null,"open_issues_count":67,"forks":833,"open_issues":67,"watchers":3684,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/baidu/Paddle/pulls/287"},"html":{"href":"https://github.com/baidu/Paddle/pull/287"},"issue":{"href":"https://api.github.com/repos/baidu/Paddle/issues/287"},"comments":{"href":"https://api.github.com/repos/baidu/Paddle/issues/287/comments"},"review_comments":{"href":"https://api.github.com/repos/baidu/Paddle/pulls/287/comments"},"review_comment":{"href":"https://api.github.com/repos/baidu/Paddle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/baidu/Paddle/pulls/287/commits"},"statuses":{"href":"https://api.github.com/repos/baidu/Paddle/statuses/460320a41c24c6f1150bd4d9a9e499474ca28935"}}}}
{"actor":{"display_login":"qingqing01"}}