Spec-Zone.ru › TensorFlow C++ 2.9

tensorflow::ops::Exp

#include <math_ops.h>

Вычисляет экспоненту от x поэлементно.

Краткое описание

\(y = e^x\).

Эта функция вычисляет экспоненту каждого элемента входного тензора. То есть exp(x) или e^(x), где x — входной тензор. e обозначает число Эйлера и приблизительно равно 2,718281. Вывод положителен для любого вещественного входного значения.

x = tf.constant(2.0)
tf.math.exp(x) ==> 7.389056
x = tf.constant([2.0, 8.0])
tf.math.exp(x) ==> array([7.389056, 2980.958], dtype=float32)

Для комплексных чисел значение экспоненты вычисляется следующим образом:

e^(x+iy) = e^x * e^iy = e^x * (cos y + i sin y)

Рассмотрим комплексное число 1+1j в качестве примера. e^1 * (cos 1 + i sin 1) = 2.7182818284590 * (0.54030230586+0.8414709848j)

x = tf.constant(1 + 1j)
tf.math.exp(x) ==> 1.4686939399158851+2.2873552871788423j

Аргументы:

  • scope: Объект Scope

Возвращаемое значение:

  • Output: Тензор y.
Конструкторы и деструкторы
Exp(const ::tensorflow::Scope & scope, ::tensorflow::Input x)
Общедоступные атрибуты
operation
Operation
y
::tensorflow::Output
Общедоступные функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const

Общедоступные атрибуты

operation

Operation operation

y

::tensorflow::Output y

Общедоступные функции

Exp

 Exp(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input x
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

© 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/versions/r2.9/api_docs/cc/class/tensorflow/ops/exp

Spec-Zone.ru

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