50% off: Unlimited data and AI learning.
The Learning Leader's Guide to AI Literacy

torch (version 0.11.0)

nnf_glu: Glu

Description

The gated linear unit. Computes:

Usage

nnf_glu(input, dim = -1)

Arguments

input

(Tensor) input tensor

dim

(int) dimension on which to split the input. Default: -1

Details

GLU(a,b)=aσ(b)

where input is split in half along dim to form a and b, σ is the sigmoid function and is the element-wise product between matrices.

See Language Modeling with Gated Convolutional Networks.