Python - tensorflow.math.expm1() Last Updated : 08 Jun, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. expm1() is used to compute element wise exp(x)-1. Syntax: tensorflow.math.expm1( x, name) Parameters: x: It's the input tensor. Allowed dtypes are bfloat16, half, float32, float64, complex64, complex128. name(optional): It defines the name for the operation. Returns: It returns a tensor of same dtype as x. Example 1: Python3 # importing the library import tensorflow as tf # Initializing the input tensor a = tf.constant([1, 2, 3, 4, 5], dtype = tf.float64) # Printing the input tensor print('Input: ', a) # Calculating result res = tf.math.expm1(x = a) # Printing the result print('Result: ', res) Output: Input: tf.Tensor([1. 2. 3. 4. 5.], shape=(5, ), dtype=float64) Result: tf.Tensor([ 1.71828183 6.3890561 19.08553692 53.59815003 147.4131591 ], shape=(5, ), dtype=float64) Example 2: Visualization Python3 # importing the library import tensorflow as tf import matplotlib.pyplot as plt # Initializing the input tensor a = tf.constant([1, 2, 3, 4, 5], dtype = tf.float64) # Calculating result res = tf.math.expm1(x = a) # Plotting the graph plt.plot(a, res, color ='green') plt.title('tensorflow.math.expm1') plt.xlabel('Input') plt.ylabel('Result') plt.show() Output: Comment More infoAdvertise with us Next Article Python | Tensorflow exp() method A aman neekhara Follow Improve Article Tags : Machine Learning AI-ML-DS With Python Practice Tags : Machine Learning Similar Reads Python | Tensorflow exp() method Tensorflow is an open-source machine learning library developed by Google. One of its applications is to develop deep neural networks. The module tensorflow.math provides support for many basic mathematical operations. Function tf.exp() [alias tf.math.exp] provides support for the exponential functi 2 min read Python - tensorflow.math.erf() TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. erf() is used to compute element wise Gauss error function. Syntax: tensorflow.math.erf(  x, name) Parameters: x: It's the input tensor. Allowed dtypes are bfloat16, h 1 min read Python - tensorflow.math.erfc() TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. erfc() is used to compute element wise complementary Gauss error function. Syntax: tensorflow.math.erfc(  x, name) Parameters: x: It's the input tensor. Allowed dtypes 1 min read Python - tensorflow.math.imag() TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. imag() is used to find the imaginary part of a tensor. Syntax: tensorflow.math.imag( input, name) Parameters: input: It is a tensor. Allowed dtypes are float, double, c 1 min read Python - tensorflow.math.ceil() TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. ceil() is used to find the element wise ceil value of the input. Syntax: tensorflow.math.ceil( x, name) Parameters: x: It's a tensor and allowed dtype for this tensor a 2 min read Python - tensorflow.math.log1p() TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning  neural networks. TensorFlow raw_ops provides low level access to all TensorFlow operations. Log1p() is used to find element wise logarithm of (1+x) for input x. Syntax: tf.math.log1p(x, 2 min read Like