---
title: "ClikaRT::ops::softcap_logits"
sidebar_label: "softcap_logits"
description: "Fused logit soft-cap: cap * tanh(x / cap) (true division), elementwise. A number cap must be > 0 (0 or negative is rejected)."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--function">function</span>

## softcap\_logits() {#softcap_logits}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`softcap_logits`**([`Tensor`](../Tensor.md) `input`, [`ScalarOrTensor`](../ScalarOrTensor.md) `cap`)

</div>

Fused logit soft-cap: `cap * `[`tanh`](./tanh.md#tanh)`(x / cap)` (true division), elementwise. A number cap must be \> 0 (0 or negative is rejected). A tensor cap broadcasts against `input` and every element must be non-zero; that precondition is the caller's contract and is not runtime-checked.

<div class="api-declared">

Declared in `ClikaRT/compute/ops.h`, line 5430

</div>
