[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: The gated linear unit (GLU) function splits an input tensor evenly into two tensors along the specified dimension dim and multiplies the former tensor by the sigmoid output of the latter tensor element-wise.
  • Formula:GLU(a,b)=aσ(b)GLU(a,b)=a \otimes \sigma(b) a and b indicate the former and latter tensors, respectively.
[object Object]

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

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

    [object Object]
    • [object Object]Atlas inference series products[object Object] and [object Object]Atlas training series products[object Object]: The data type can be DOUBLE, FLOAT, or FLOAT16.
  • 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:
    • aclnnGlu defaults to a deterministic implementation.
[object Object]

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

[object Object]