Function: DepthwiseConv2D is a two-dimensional depthwise convolution operation. In this operation, each input channel is convolved with an independent kernel (called a depthwise kernel).
Formula:
Assume that the shape of the input self is , and the shape of the output out is . The output of each convolution kernel is represented as follows:
Where denotes the convolution operation, is the batch size, is the number of channels, and and represent the width and height, respectively.
Each operator has [object Object]two-phase API calls[object Object]. First, aclnnConvDepthwise2dGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation flow. Then, aclnnConvDepthwise2d is called to perform computation.
Parameters
[object Object]Return Value
aclnnStatus: status code. For details, see [object Object]aclnn Return Codes[object Object].
The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object]
Parameters
[object Object]Return Value
aclnnStatus: status code. For details, see [object Object]aclnn Return Codes[object Object].
- Deterministic computation:
- aclnnConvDepthwise2d defaults to a deterministic implementation.
The following example is for reference only. For details, see .