You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/09/25 19:10:43 UTC

[GitHub] ChaiBapchya commented on issue #12594: [MXNET-867] Pooling1D with "same" padding

ChaiBapchya commented on issue #12594: [MXNET-867] Pooling1D with "same" padding
URL: https://github.com/apache/incubator-mxnet/pull/12594#issuecomment-424465389
 
 
   As discussed with Sina Afrooze and Lin, this is just the first step towards complete solution/fix.
   
   Immediate demand was for Max Pool 1 Dimension to support "same" padding (the way Tensorflow does). Above pull request addresses that.
   
   However, for a complete solution, following things need to be understood
   
   ### Asymmetric Padding
   Feature request is about "Asymmetric padding"
   Currently, MXNet supports Symmetric padding
   e.g. Input data -> `1,2,3,4` and `pad`=`2` 
   Output data -> `0,0,1,2,3,4,0,0`
    
   #### Why isn't Asymmetric padding supported by CUDnn, MXNet?
   
   Due to misalignment of input-output if padding happens only on one side (left or right alone).
   It is called as *"Causal Convolution"* (only one side pad)
   
   ### Current work-around
   Level of abstraction introduced.
   By default, one can use `pad` parameter while performing `Pooling` or `Convolution` which performs symmetric padding. But, if there is a specific use-case for performing asymmetric padding, one has to perform following steps,
   Perform independent padding (using `pad` operator) and then perform `Pooling` or `Convolution` as desired.
   
   ### Future steps
   If one has to fully implement asymmetric padding, following changes need to be made
   1. Pooling
   - Add another parameter such as pad_type (because currently, `pooling_conv` which allows - 'full', 'valid', 'same' has been misused. Original meaning of `pooling_conv` was not supposed to take care of "type of padding"
   
   2. Convolution
   - Incorporate asymmetric padding for the same
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services