tf.keras.ops.log_sigmoid  |  TensorFlow v2.16.1 (original) (raw)

tf.keras.ops.log_sigmoid

Logarithm of the sigmoid activation function.

View aliases

Main aliases

tf.keras.ops.nn.log_sigmoid

tf.keras.ops.log_sigmoid(
    x
)

It is defined as f(x) = log(1 / (1 + exp(-x))).

Args
x Input tensor.
Returns
A tensor with the same shape as x.

Example:

x = keras.ops.convert_to_tensor([-0.541391, 0.0, 0.50, 5.0]) keras.ops.log_sigmoid(x) array([-1.0000418, -0.6931472, -0.474077, -0.00671535], dtype=float32)

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.

Last updated 2024-06-07 UTC.