[object Object]

[object Object][object Object]undefined
[object Object]
  • 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 (N,Cin,H,W)(N, C_{\text{in}}, H, W), and the shape of the output out is (N,Cout,Hout,Wout)(N, C_{\text{out}}, H_{\text{out}}, W_{\text{out}}). The output of each convolution kernel is represented as follows:

    out(Ni,Coutj)=bias(Coutj)+weight(Coutj,Cinj)self(Ni,Cinj)\text{out}(N_i, C_{\text{out}_j}) = \text{bias}(C_{\text{out}_j}) + \text{weight}(C_{\text{out}_j}, C_{\text{in}_j}) \star \text{self}(N_i, C_{\text{in}_j})

    Where \star denotes the convolution operation, NN is the batch size, CC is the number of channels, and WW and HH represent the width and height, respectively.

[object Object]

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.

[object Object]
[object Object]
[object Object]
  • 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]
[object Object]
  • Parameters

    [object Object]
  • Return Value

    aclnnStatus: status code. For details, see [object Object]aclnn Return Codes[object Object].

[object Object]
  • Deterministic computation:
    • aclnnConvDepthwise2d defaults to a deterministic implementation.
[object Object][object Object]

The following example is for reference only. For details, see .

[object Object]