Pad
Availability
Function Usage
Pads dimensions of the input tensor based on paddings. The padding value is 0.
Prototype
const aclTensor* Pad(const aclTensor* self, const aclTensor* paddings, aclOpExecutor* executor)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
self |
Input |
Input tensor to be padded. The data type can be FLOAT16, FLOAT, INT16, UINT16, INT32, or INT64. The data format can be ND. |
paddings |
Input |
Padding sizes of dimensions of the input tensor. The shape is [self.dim, 2]. The data type can be INT32 or INT64, and the data format can be ND. |
executor |
Input |
Operator executor, containing the operator computation process. |
Returns
A tensor padded with 0s.
Constraints
None
Example
1 2 | //Call l0op::Pad to perform dimension padding on self. l0op::Pad(self, paddingsTensor, executor); |
Parent topic: Basic Kernel Function APIs