torch.nn.functional.glu
- torch.nn.functional.glu(input, dim=-1) → Tensor
The gated linear unit. Computes:
The gated linear unit. Computes:
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.