[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: DepthwiseConv2D is a 2D 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 self is (N,Cin,H,W)(N, C_{\text{in}}, H, W) and the shape of out is (N,NCout,Hout,Wout)(N, N*C_{\text{out}}, H_{\text{out}}, W_{\text{out}}). The output of each convolution kernel is computed as:

    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 calls. 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]
  • Returns

    aclnnStatus: status code. For details, see .

    The first-phase API implements input parameter verification. The following errors may be thrown.

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns

    aclnnStatus: status code. For details, see .

[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]