介绍
计算e的x次方
别名
- tf.exp 最常用
语法
tf.math.exp(
x,
name=None
)
参数
- x:tensor,必须是下面类型之一:bfloat16, half, float32, float64, complex64, complex128
例子
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)