[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Computes the backward pass of a temporal convolution.

  • Formula:

    Assume the forward input inputinput of Conv_tbc has shape (Hin,N,Cin)(H_{\text{in}},N,C_{\text{in}}), the output gradient gradOutputgradOutput has shape (Hout,N,Cout)(H_{\text{out}},N,C_{\text{out}}), the convolution kernel weightweight has shape (K,Cin,Cout)(K,C_{\text{in}},C_{\text{out}}), and the bias biasbias has shape (Cout)(C_{\text{out}}).

    Hout=Hin+2padKS+1H_{out} = \lfloor \frac{H_{in} + 2 \cdot pad - K}{S} \rfloor + 1

    The backward pass computes gradients with respect to the forward-pass tensors: the input tensor xx (corresponding to input in the function prototype), the convolution kernel weights ww (corresponding to weight in the function prototype), and the bias bb.

    • Gradient with respect to xx, Lx\frac{\partial L}{\partial x} (corresponding to the gradInput parameter in the function prototype):

      Lxt,b,cin=k=0K1cout=0Cout1Lytk,b,coutwk,cin,cout\frac{\partial L}{\partial x_{t,b,c_{in}}} = \sum_{k=0}^{K-1} \sum_{c_{out}=0}^{C_{out}-1} \frac{\partial L}{\partial y_{t-k,b,c_{out}}} \cdot w_{k,c_{in},c_{out}}

      Where LL is the loss function and Ly\frac{\partial L}{\partial y} is the gradient of the loss LL with respect to the output tensor yy (corresponding to the gradOutput parameter in the function prototype).

    • Gradient with respect to ww, Lw\frac{\partial L}{\partial w} (corresponding to the gradWeight parameter in the function prototype):

      Lwk,cin,cout=b=0N1t=0Hout1xtS+k,b,cinLyt,b,cout\frac{\partial L}{\partial w_{k,c_{in},c_{out}}} = \sum_{b=0}^{N-1} \sum_{t=0}^{H_{out}-1} x_{t \cdot S+k,b,c_{in}} \cdot \frac{\partial L}{\partial y_{t,b,c_{out}}}
    • Gradient with respect to bb, Lb\frac{\partial L}{\partial b} (corresponding to the gradBias parameter in the function prototype):

      Lbcout=b=0N1t=0Hout1Lyt,b,cout\frac{\partial L}{\partial b_{c_{out}}} = \sum_{b=0}^{N-1}\sum_{t=0}^{H_{\text{out}}-1} \frac{\partial L}{\partial y_{t,b,c_{out}}}
[object Object]

Each operator has calls. First, aclnnConvTbcBackwardGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation flow. Then, aclnnConvTbcBackward is called to perform computation.

[object Object]
[object Object]
[object Object]
  • Parameters

    [object Object]
    • Formula 1: (Hout,N,Cout)(H_{\text{out}},N,C_{\text{out}})
    • Formula 2: (Hin,N,Cin)(H_{\text{in}},N,C_{\text{in}})
    • Formula 3: (K,Cin,Cout)(K,C_{\text{in}},C_{\text{out}})
    • Formula 4: (Cout)(C_{\text{out}})
    • Formula 5: (Hin,N,Cin)(H_{\text{in}},N,C_{\text{in}})
    • Formula 6: (K,Cin,Cout)(K,C_{\text{in}},C_{\text{out}})
    • Formula 7: (Cout)(C_{\text{out}})
  • 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:

    • aclnnConvTbcBackward defaults to a non-deterministic implementation. You can call aclrtCtxSetSysParamOpt to enable deterministic computation.
    [object Object]

Due to hardware resource limitations, the operator may fail for certain parameter combinations. Analyze the error logs to diagnose the issue. If the error persists, click to obtain technical support.

[object Object]

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

[object Object]