-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Expose ROI Pooling into Python API. #10169
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
Conversation
|
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.
| 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
| 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.
不需要的
Uh oh!
There was an error while loading. Please reload this page.