tf.math.lgamma
Вычисляет логарифм абсолютного значения Gamma(x) поэлементно.
tf.math.lgamma(
x, name=None
)
Для положительных чисел эта функция вычисляет log((input - 1)!) для каждого элемента в тензоре. lgamma(5) = log((5-1)!) = log(4!) = log(24) = 3.1780539
Пример:
x = tf.constant([0, 0.5, 1, 4.5, -4, -5.6]) tf.math.lgamma(x) ==> [inf, 0.5723649, 0., 2.4537368, inf, -4.6477685]
| Аргументы | |
|---|---|
x | A Tensor. Должен быть одного из следующих типов: bfloat16, half, float32, float64. |
name | Имя операции (необязательно). |
| Возвращаемое значение | |
|---|---|
A Tensor. Имеет тот же тип, что и x. |
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/python/tf/math/lgamma