[object Object][object Object][object Object]undefined
[object Object]
  • API function: The Swin Transformer network model completes the calculation of Q, K, and V.

  • Formula:

    q/k/v = (Quant(Layernorm(x).transpose) * weight).dequant.transpose.split weight is a concatenation of weights of three matrices Q, K, and V.

[object Object]

Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.

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

    [object Object]
  • Returns

    [object Object]: status code. For details, see .

    The first-phase API implements input parameter validation. The following error codes may be returned.

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns

    [object Object]: status code. For details, see .

[object Object]
  • Deterministic computation:
    • [object Object] defaults to deterministic implementation.
  • The value of seqLength can only be 32 or 64.
  • oriHeight × oriWeight = Second dimension of the input x tensor (oriHeight is an integer multiple of hWinSize and oriWeight is an integer multiple of wWinSize.)
  • Both values of hWinSize and wWinSize range from 7 to 32.
  • The first dimension B of the input x tensor ranges from 1 to 32.
  • weight needs to be transposed.
[object Object]

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

[object Object]