singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] joddiy opened a new pull request #611: Singa 507 _Conv2d and _Pooling2d support odd padding
Date Fri, 28 Feb 2020 12:21:44 GMT
joddiy opened a new pull request #611: Singa 507 _Conv2d and _Pooling2d support odd padding
URL: https://github.com/apache/singa/pull/611
 
 
   Since onnx requests same padding mode, we need to optimize conv and pooling these 2 operators.
   
   FYI:
   
   > auto_pad must be either NOTSET, SAME_UPPER, SAME_LOWER or VALID. Where default value
is NOTSET, which means explicit padding is used. SAME_UPPER or SAME_LOWER mean pad the input
so that the output spatial size match the input.In case of odd number add the extra padding
at the end for SAME_UPPER and at the beginning for SAME_LOWER. VALID mean no padding.
   
   This JR will finish:
   
   - lower-level ops(_Conv2d and _Pooling2d) support odd padding mode, for example, if padding
is [2,5,2,5], it will crop to a normal padding with [2,2,2,2], and a odd padding with [0,3,0,3].
The odd padding will be added to x tensor firstly and then do normal process with normal padding,
then in the backward, the odd padding will be cropped.
   - upper-level ops support four bins padding(i.e., (1,2,1,2,)) and also SAME_UPPER, SAME_LOWER
for both 2d and 1d input.
   - For SAME_UPPER, SAME_LOWER, can do shape checking, and if not set shape, can compute
the correct shape.
   - Test cases.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Mime
View raw message