{"action":"created","issue":{"url":"https://api.github.com/repos/facebookresearch/Detectron/issues/684","repository_url":"https://api.github.com/repos/facebookresearch/Detectron","labels_url":"https://api.github.com/repos/facebookresearch/Detectron/issues/684/labels{/name}","comments_url":"https://api.github.com/repos/facebookresearch/Detectron/issues/684/comments","events_url":"https://api.github.com/repos/facebookresearch/Detectron/issues/684/events","html_url":"https://github.com/facebookresearch/Detectron/issues/684","id":363845355,"node_id":"MDU6SXNzdWUzNjM4NDUzNTU=","number":684,"title":"where to reshape 'kps_score' ?","user":{"login":"lilichu","id":28217651,"node_id":"MDQ6VXNlcjI4MjE3NjUx","avatar_url":"https://avatars0.githubusercontent.com/u/28217651?v=4","gravatar_id":"","url":"https://api.github.com/users/lilichu","html_url":"https://github.com/lilichu","followers_url":"https://api.github.com/users/lilichu/followers","following_url":"https://api.github.com/users/lilichu/following{/other_user}","gists_url":"https://api.github.com/users/lilichu/gists{/gist_id}","starred_url":"https://api.github.com/users/lilichu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lilichu/subscriptions","organizations_url":"https://api.github.com/users/lilichu/orgs","repos_url":"https://api.github.com/users/lilichu/repos","events_url":"https://api.github.com/users/lilichu/events{/privacy}","received_events_url":"https://api.github.com/users/lilichu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-26T03:35:03Z","updated_at":"2018-09-26T06:40:10Z","closed_at":null,"author_association":"NONE","body":"hi! I'm new user to caffe2. If I want to reshape `kps_score` in` keypoint_rcnn_heads.py` before `model.net.Reshape()` :\r\n```\r\ndef add_keypoint_losses(model):\r\n    \"\"\"Add Mask R-CNN keypoint specific losses.\"\"\"\r\n    # Reshape input from (N, K, H, W) to (NK, HW)\r\n    model.net.Reshape(\r\n        ['kps_score'], ['kps_score_reshaped', '_kps_score_old_shape'],\r\n        shape=(-1, cfg.KRCNN.HEATMAP_SIZE * cfg.KRCNN.HEATMAP_SIZE)\r\n    )\r\n```\r\nfor example, I want reshape `kps_score` from `(N, K, H, W)` to `(N, H, W, K)`. where to reshape it?\r\nthanks!\r\n"},"comment":{"url":"https://api.github.com/repos/facebookresearch/Detectron/issues/comments/424602534","html_url":"https://github.com/facebookresearch/Detectron/issues/684#issuecomment-424602534","issue_url":"https://api.github.com/repos/facebookresearch/Detectron/issues/684","id":424602534,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDYwMjUzNA==","user":{"login":"lilichu","id":28217651,"node_id":"MDQ6VXNlcjI4MjE3NjUx","avatar_url":"https://avatars0.githubusercontent.com/u/28217651?v=4","gravatar_id":"","url":"https://api.github.com/users/lilichu","html_url":"https://github.com/lilichu","followers_url":"https://api.github.com/users/lilichu/followers","following_url":"https://api.github.com/users/lilichu/following{/other_user}","gists_url":"https://api.github.com/users/lilichu/gists{/gist_id}","starred_url":"https://api.github.com/users/lilichu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lilichu/subscriptions","organizations_url":"https://api.github.com/users/lilichu/orgs","repos_url":"https://api.github.com/users/lilichu/repos","events_url":"https://api.github.com/users/lilichu/events{/privacy}","received_events_url":"https://api.github.com/users/lilichu/received_events","type":"User","site_admin":false},"created_at":"2018-09-26T06:40:10Z","updated_at":"2018-09-26T06:40:10Z","author_association":"NONE","body":"I do it in `def add_keypoint_visible_outputs(model, blob_in, dim) ` (copy `def add_keypoint_outputs(model, blob_in, dim)`) of  `keypoint_rcnn_heads.py`:\r\n```\r\n......\r\n    if upsample_heatmap:\r\n        # Increase heatmap output size via bilinear upsampling\r\n        blob_out = model.BilinearInterpolation(\r\n            blob_out, 'kps_visible_score', 3,\r\n            3, cfg.KRCNN.UP_SCALE\r\n        )\r\n        blob_out = model.net.Transpose(blob_out, axes=(0,2,3,1))\r\n    return blob_out\r\n```\r\nthe output net:\r\n```\r\nINFO net.py: 250: visible_conv_fcn8           : (4, 512, 14, 14)     => kps_visible_score_lowres    : (4, 3, 28, 28)       ------- (op: ConvTranspose)\r\nINFO net.py: 250: kps_visible_score_lowres    : (4, 3, 28, 28)       => kps_visible_score           : (4, 3, 56, 56)       ------- (op: ConvTranspose)\r\nINFO net.py: 250: kps_visible_score           : (4, 3, 56, 56)       => Transpose                   : (4, 56, 56, 3)       ------- (op: Transpose)\r\nINFO net.py: 250: kps_visible_score           : (4, 3, 56, 56)       => kps_visible_score_reshaped  : (12544, 3)           ------- (op: Reshape)\r\n```\r\nwhy the name of transpose result is `Transpose` rather than `kps_visible_score`?\r\n`INFO net.py: 250: kps_visible_score           : (4, 3, 56, 56)       => Transpose                   : (4, 56, 56, 3)       ------- (op: Transpose)`\r\nhow should I do? thanks!"}}
{"actor":{"display_login":"lilichu"}}