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

mig deformable_conv to deform_conv2d #27841

Merged
merged 3 commits into from
Oct 12, 2020

Conversation

baiyfbupt
Copy link
Contributor

@baiyfbupt baiyfbupt commented Oct 12, 2020

PR types

Function optimization

PR changes

APIs

Describe

  • 删除paddle.fluid.layers.deformable_conv -> paddle.static.nn.deformable_conv的alias,重新实现paddle.static.nn.deform_conv2d接口,修改英文文档和示例代码,改成使用2.0API。
  • 修改输入参数名:
    • paddle.fluid.layers.deformable_conv函数定义

      paddle.fluid.layers.deformable_conv(input, offset, mask, num_filters, filter_size, stride=1, padding=0, dilation=1, groups=None, deformable_groups=None, im2col_step=None, param_attr=None, bias_attr=None, modulated=True, name=None)
      
    • paddle.static.nn.deform_conv2d函数定义

      paddle.static.nn.deform_conv2d(x, offset, mask, num_filters, filter_size, stride=1, padding=0, dilation=1, groups=1, deformable_groups=1, im2col_step=1, weight_attr=None, bias_attr=None, name=None)
      

预览效果见#27841 (comment)

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@baiyfbupt
Copy link
Contributor Author

image
image
image

Copy link
Contributor

@jzhang533 jzhang533 left a comment

Choose a reason for hiding this comment

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

lgtm

float32, float64.
offset (Tensor): The input coordinate offset of deformable convolution layer.
A Tensor with type float32, float64.
Mask (Tensor, Optional): The input mask of deformable convolution layer.
Copy link
Contributor

Choose a reason for hiding this comment

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

Mask -> mask

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will fix in next PR

filter_size (int|tuple): The filter size. If filter_size is a tuple,
it must contain two integers, (filter_size_H, filter_size_W).
Otherwise, the filter will be a square.
stride (int|tuple): The stride size. If stride is a tuple, it must
Copy link
Contributor

Choose a reason for hiding this comment

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

stride -> im2col_step 都需要加上"optional"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will fix in next PR

@baiyfbupt baiyfbupt merged commit 6cdf2c9 into PaddlePaddle:develop Oct 12, 2020
chen-zhiyu pushed a commit to chen-zhiyu/Paddle that referenced this pull request Oct 15, 2020
* mig deformable_conv to deform_conv2d
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.

3 participants