Skip to content
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

Closed
wants to merge 4 commits into from
Closed

Expose ROI Pooling into Python API. #10169

wants to merge 4 commits into from

Conversation

dyning
Copy link
Contributor

@dyning dyning commented Apr 24, 2018

  • Expose ROI Pooling into Python API.
  • Add unit testing.

@CLAassistant
Copy link

CLAassistant commented Apr 24, 2018

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


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.

@chengduoZH
Copy link
Contributor

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)
Copy link
Contributor

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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line.

Copy link
Contributor Author

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):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"pooled_width": pooled_width,
"spatial_scale": spatial_scale
})
return pool_out, argmaxes
Copy link
Contributor

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了吧。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要的

@dyning dyning closed this Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants