When I implemented pad operation for WebNN-Baseline webmachinelearning/webnn-baseline#47, I found there would be missing constraints of 'beginningPadding' and 'endingPadding' in "reflection" and "symmetric" mode, I propose to add constraints likes below table. @huningxin @wchao1115 @fdwr PTAL, thanks.
| padding\mode |
reflection |
symmetric |
| beginningPadding |
beginningPadding[d] < input size of dimension d |
beginningPadding[d] <= input size of dimension d |
| endingPadding |
endingPadding[d] < input size of dimension d |
endingPadding[d] <= input size of dimension d |
Reference:
- DML_PADDING_OPERATOR_DESC
- tf.mirrorPad