tf.keras.ops.softplus
Функция активации Softplus.
tf.keras.ops.softplus(
x
)
Она определяется как f(x) = log(exp(x) + 1), где log — натуральный логарифм, а exp — экспоненциальная функция.
| Аргументы | |
|---|---|
x | Входной тензор. |
| Возвращает | |
|---|---|
Тензор с той же формой, что и x. |
Пример:
x = keras.ops.convert_to_tensor([-0.555, 0.0, 0.555]) keras.ops.softplus(x) array([0.45366603, 0.6931472, 1.008666], 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/softplus