You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implemented operator supports padding in all dimensions and asymmetric padding. And it is implemented in software only, no accelerated version is available. The code is tested in both CPP and python API. In the CPP test, I test it with different input sizes (2D, 4D) and different padding patterns (asymmetric, symmetric). The python API testing is mainly focused on it can work in a graph.
Example Python code.
```python
# consider input_tensor is a 4D tensor, we pad the last 2 dimension with 1
out = array_ops.padding(input_tensor, [0, 0, 0, 0, 1, 1, 1, 1], "padding")
# consider input_tensor is a 4D tensor, we pad the 2nd dimension with symmetric
# padding with size 1 and the 3rd dimension with asymmetric padiing of size 1 and 2.
out = array_ops.padding(input_tensor, [0, 0, 0, 0, 1, 1, 1, 2], "padding")
```
Fixes issue #94.
Sometimes tensors need to be manually padded in some dimensions. Add an operator like numpy.pad.
The text was updated successfully, but these errors were encountered: