-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose ROI Pooling into Python API. #10169
Conversation
dyning
commented
Apr 24, 2018
•
edited by qingqing01
edited by qingqing01
- Expose ROI Pooling into Python API.
- Add unit testing.
duyuning seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Please sign the CLA and make CI passed first. |
""" | ||
helper = LayerHelper('roi_pool', **locals()) | ||
dtype = helper.input_dtype() | ||
pool_out = helper.create_tmp_variable(dtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also need to create variable for Argmax
.
@@ -359,6 +359,17 @@ def test_topk(self): | |||
self.assertIsNotNone(indices) | |||
print(str(program)) | |||
|
|||
def test_roi_pool(self): | |||
print("test_roi_pool") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -3759,3 +3760,44 @@ def label_smooth(label, | |||
outputs={"Out": smooth_label}, | |||
attrs={"epsilon": float(epsilon)}) | |||
return smooth_label | |||
|
|||
|
|||
def roi_pool(input, rois, pooled_height=1, pooled_width=1, spatial_scale=1.0): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add roi_pool
in doc : https://github.com/PaddlePaddle/Paddle/blob/develop/doc/fluid/api/layers.rst#nn
"pooled_width": pooled_width, | ||
"spatial_scale": spatial_scale | ||
}) | ||
return pool_out, argmaxes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一般ROI pool
之后的op需要argmaxes
么?如果不需要,就不用return了吧。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要的