---
title: "gelu"
sidebar_label: "gelu"
description: "Kotlin binding reference: gelu."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[gelu](gelu.md)

# gelu

[common]\
fun [gelu](gelu.md)(input: [Tensor](../Tensor/index.md), approximate: [GeluMode](../GeluMode/index.md) = GeluMode.NONE): [Tensor](../Tensor/index.md)

`gelu(input: Tensor, approximate: GeluMode = GeluMode.NONE)`: the `gelu` operator. Gaussian error linear unit. `approximate = GeluMode::Tanh` selects the cheaper tanh form used by many transformer checkpoints; `GeluMode::None` is the exact erf form.