Improve Pad to match ONNX and overcome current limitations
Refactor Pad operator to solve several issues.
Should fix:
-
aidge_onnx#72 (closed); -
aidge_onnx#81 (closed); -
aidge_backend_cuda#53 (closed): backward support in CUDA; -
aidge_backend_cuda#19 (closed): Pad1D support in CUDA; -
aidge_backend_cpu#46 (closed) and previous associated MR !447 (closed); - Implemented solution: add a specific
ConstantLowest
pad mode, instead of trying to work around the correct type and value of the constant_value input Producer. It can be handled very easily in exports or backends, much like theConstant
pad mode.
- Implemented solution: add a specific
-
#244 (closed) and aidge_onnx#25 (closed): count_include_pad
support. Also close aidge#290 (closed);- Implemented solution: introduce a
ignorePads
attribute to AvgPooling op, like suggested here. It is extremely simple to implement and allows to fully uncouple padding and pooling whencount_include_pad
is true.
- Implemented solution: introduce a
-
aidge#131 (closed): Pad1D support in CUDA; -
Missing backward implementation on CPU; -
Correct un-reported bug in Reflect mode.
Edited by Olivier BICHLER