Learn R Programming

torch (version 0.8.1)

nnf_gelu: Gelu

Description

Gelu

Usage

nnf_gelu(input)

Arguments

input

(N,*) tensor, where * means, any number of additional dimensions

gelu(input) -> Tensor

Applies element-wise the function \(GELU(x) = x * \Phi(x)\)

where \(\Phi(x)\) is the Cumulative Distribution Function for Gaussian Distribution.

See Gaussian Error Linear Units (GELUs).