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



[ Full content available at: 
https://github.com/apache/incubator-mxnet/pull/12594 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to