Spec-Zone.ru › TensorFlow

tf.keras.ops.sigmoid

Функция активации сигмоиды.

Просмотр псевдонимов

Основные псевдонимы

tf.keras.ops.nn.sigmoid

tf.keras.ops.sigmoid(
    x
)

Она определяется как f(x) = 1 / (1 + exp(-x)).

Аргументы
x Входной тензор.
Возвращает
Тензор с той же формой, что и x.

Пример:

x = keras.ops.convert_to_tensor([-6.0, 1.0, 0.0, 1.0, 6.0])
keras.ops.sigmoid(x)
array([0.00247262, 0.7310586, 0.5, 0.7310586, 0.9975274], dtype=float32)

© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/keras/ops/sigmoid

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API