Welcome to our Support Center

BiasSplitGelu

Description

A fusion used in diffusion model that after adding bias, hidden state is sliced into two tensors of same size, then left tensor multiplies the Gelu activation result of right tensor.

 

Input parameters

 

specified_outputs_namearray, this parameter lets you manually assign custom names to the output tensors of a node.

 Graphs in : cluster, ONNX model architecture.

X – T : object, input tensor. Dimensions are (N, S, D), where N is the batch size, S are image size, and D is hidden dimension.
bias – T : object, bias tensor. Dimensions are (D), where D is the same hidden dimension as input tensor.

 Parameters : cluster,

 training? : boolean, whether the layer is in training mode (can store data for backward).
Default value “True”.
 lda coeff : float, defines the coefficient by which the loss derivative will be multiplied before being sent to the previous layer (since during the backward run we go backwards).
Default value “1”.

 name (optional) : string, name of the node.

Output parameters

 

 Y – T : object, the output tensor with dimensions (N, S, D/2).

Type Constraints

T in (tensor(float)tensor(float16)) : Constrain input X and output Y types to float tensors.

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).
Table of Contents