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

Filter dilation for pooling layer and how to set the output size #325

Closed
XiaobingSuper opened this issue Sep 19, 2018 · 8 comments
Closed
Assignees
Labels
enhancement A feature or an optimization request

Comments

@XiaobingSuper
Copy link

XiaobingSuper commented Sep 19, 2018

Hi, I have some questions about mkldnn pooling, mainly about max_pooling.

  1. Is there support filter dilation for max_pooling ?

  2. What is the model used when setting the output size, ceil model or floor model? for example, we can chose the model by the parameter ceil_model in pytorch-maxpool2d, which can get different output size using different mode. But in mkldnn, there will be error when using floor model and ceil model is ok.

Thanks.

@vpirogov
Copy link
Member

Intel MKL-DNN supports dilation in convolutions only, not in pooling. We are also not aware of any cases where dilation is used in pooling layers. Do you have any example models or a paper that describes how it's used?

The output shape for pooling in Intel MKL-DNN can be controlled using padding parameters. The library does not have ceil or floor flags, so I'm not exactly sure what errors you are referring to.

@XiaobingSuper
Copy link
Author

For the first question, I didn't find related papers now, but you can see this issue saying why we should add dilation in pooling, I have found that many frameworks supporting dilation pooling, such as pytorch and tensorflow.

For last question, it is my fault because I didn't consider to use the padding parameters to controll the output shape. Thanks!

@vpirogov vpirogov added enhancement A feature or an optimization request and removed question labels Oct 5, 2018
@vpirogov
Copy link
Member

vpirogov commented Oct 5, 2018

Thanks! I'm adding 'enhancement' label to track the dilated pooling request.

@vpirogov vpirogov self-assigned this Oct 5, 2018
@jignparm
Copy link

Any update or ETA on supporting dilations in the pooling operations?

The latest version of the ONNX operators have added ceil_mode and dilations to the MaxPool operator (see below)

https://github.com/onnx/onnx/blob/master/docs/Operators.md#MaxPool

@XiaobingSuper
Copy link
Author

@jignparm, the ceil model can be support by changing the padding size of MKLDNN MaxPooling padding to get the given output size. The dilations to MaxPool is not supported now. Thanks!

@XiaobingSuper
Copy link
Author

@vpirogov, Any progress? PyTorch Community pytorch/pytorch#34675 said Max_pool2d is slow in native CPU path, so I think if MKLDNN can support it, may be can get a good performance.

@vpirogov
Copy link
Member

Hi @XiaobingSuper,

We did not get to evaluation of this functionality yet. Considering that there's interest from Pytorch community I'm bumping priority of this request.

@vpirogov
Copy link
Member

Filter dilation for pooling is introduced in dc68611.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature or an optimization request
Projects
None yet
Development

No branches or pull requests

3 participants