---
title: "ClikaRT::ops::log_sigmoid"
sidebar_label: "log_sigmoid"
description: "Logarithm of the sigmoid, computed stably. \\[ \\mathrm{log\\_sigmoid}(x) = \\log\\frac{1}{1 + e^{-x}} = -\\,\\mathrm{softplus}(-x) \\] ClikaRT::Error when the input's dtype is not served for this operation (…"
---

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

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

## log\_sigmoid() {#log_sigmoid}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`log_sigmoid`**([`Tensor`](../Tensor.md) `input`)

</div>

Logarithm of the sigmoid, computed stably.

$$
\mathrm{log\_sigmoid}(x) = \log\frac{1}{1 + e^{-x}} = -\,\mathrm{softplus}(-x)
$$

**Throws**

- `ClikaRT::Error`: when the input's dtype is not served for this operation (the machine-readable reason rides `code_name()`).

**Returns:** a new tensor, same shape and dtype as `input`.

```cpp
auto y = ClikaRT::ops::log_sigmoid(x);
```

<div class="api-declared">

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

</div>
