Python - tensorflow.math.log_sigmoid() Last Updated : 24 Feb, 2023 Comments Improve Suggest changes Like Article Like Report TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning neural networks. log_sigmoid() is used to find element wise log sigmoid of x. Specifically, y = log(1 / (1 + exp(-x))). Syntax: tf.math.log_sigmoid(x, name) Parameter: x: It's the input tensor. Allowed dtype for this tensor are float32, float64.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([.2, .5, .7, 1], dtype = tf.float64) # Printing the input tensor print('Input: ', a) # Calculating result res = tf.math.log_sigmoid(x = a) # Printing the result print('Result: ', res) Output: Input: tf.Tensor([0.2 0.5 0.7 1. ], shape=(4, ), dtype=float64) Result: tf.Tensor([-0.59813887 -0.47407698 -0.40318605 -0.31326169], shape=(4, ), 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([.2, .5, .7, 1], dtype = tf.float64) # Calculating result res = tf.math.log_sigmoid(x = a) # Plotting the graph plt.plot(a, res, color = 'green') plt.title('tensorflow.math.log_sigmoid') plt.xlabel('Input') plt.ylabel('Result') plt.show() Output: Comment More infoAdvertise with us Next Article Python - tensorflow.math.log_sigmoid() A aman neekhara Follow Improve Article Tags : Machine Learning AI-ML-DS With Python Practice Tags : Machine Learning Similar Reads Python - tensorflow.math.sigmoid() TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. sigmoid() is used to find element wise sigmoid of x. Syntax: tensorflow.math.sigmoid(x, name) Parameters: x: It's a tensor. Allowed dtypes are float16, float32, float64, 1 min read Python | Tensorflow nn.sigmoid() Tensorflow is an open-source machine learning library developed by Google. One of its applications is to develop deep neural networks. The module tensorflow.nn provides support for many basic neural network operations.One of the many activation functions is the sigmoid function which is defined as f 3 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 Python - tensorflow.math.lgamma() TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. lgamma() is used to Compute element wise log of absolute value of Gamma(x). Syntax: tensorflow.math.lgamma( x, name) Parameters: x: It is a tensor. Allowed dtypes are b 1 min read Python - tensorflow.math.acos() TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning  neural networks. acos() is used to find element wise acos of x. Syntax: tf.math.acos(x, name) Parameters: x: It's the input tensor. Allowed dtype for this tensor are bfloat16, half, flo 1 min read Like