tf.math.expm1
Stay organized with collections
Save and categorize content based on your preferences.
Computes exp(x) - 1
element-wise.
tf.math.expm1(
x, name=None
)
i.e. exp(x) - 1
or e^(x) - 1
, where x
is the input tensor.
e
denotes Euler's number and is approximately equal to 2.718281.
x = tf.constant(2.0)
tf.math.expm1(x) ==> 6.389056
x = tf.constant([2.0, 8.0])
tf.math.expm1(x) ==> array([6.389056, 2979.958], dtype=float32)
x = tf.constant(1 + 1j)
tf.math.expm1(x) ==> (0.46869393991588515+2.2873552871788423j)
Args |
x
|
A Tensor . Must be one of the following types: bfloat16 , half , float32 , float64 , complex64 , complex128 .
|
name
|
A name for the operation (optional).
|
Returns |
A Tensor . Has the same type as x .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.math.expm1\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------|\n| [TensorFlow 2 version](/api_docs/python/tf/math/expm1) |\n\nComputes `exp(x) - 1` element-wise.\n\n#### View aliases\n\n\n**Main aliases**\n\n\\`tf.expm1\\`\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.expm1`](/api_docs/python/tf/math/expm1), [`tf.compat.v1.math.expm1`](/api_docs/python/tf/math/expm1), \\`tf.compat.v2.math.expm1\\`\n\n\u003cbr /\u003e\n\n tf.math.expm1(\n x, name=None\n )\n\ni.e. `exp(x) - 1` or `e^(x) - 1`, where `x` is the input tensor.\n`e` denotes Euler's number and is approximately equal to 2.718281.\n\u003e\n\u003e x = tf.constant(2.0)\n\u003e tf.math.expm1(x) ==\u003e 6.389056\n\u003e\n\u003e x = tf.constant([2.0, 8.0])\n\u003e tf.math.expm1(x) ==\u003e array([6.389056, 2979.958], dtype=float32)\n\u003e\n\u003e x = tf.constant(1 + 1j)\n\u003e tf.math.expm1(x) ==\u003e (0.46869393991588515+2.2873552871788423j)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|----------------------------------------------------------------------------------------------------------------------|\n| `x` | A `Tensor`. Must be one of the following types: `bfloat16`, `half`, `float32`, `float64`, `complex64`, `complex128`. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor`. Has the same type as `x`. ||\n\n\u003cbr /\u003e"]]