Python - tensorflow.math.sigmoid() Last Updated : 05 Nov, 2021 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. 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, complex64, or complex128.name(optional): It defines the name for the operation. Return: It return 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, 2, 5, 10], dtype = tf.float64) # Printing the input tensor print('a: ', a) # Calculating result res = tf.math.sigmoid(x = a) # Printing the result print('Result: ', res) Output: a: tf.Tensor([ 0.2 0.5 0.7 1. 2. 5. 10. ], shape=(7, ), dtype=float64) Result: tf.Tensor( [0.549834 0.62245933 0.66818777 0.73105858 0.88079708 0.99330715 0.9999546 ], shape=(7, ), 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, 2, 5, 10], dtype = tf.float64) # Calculating result res = tf.math.sigmoid(x = a) # Plotting the graph plt.plot(a, res, color = 'green') plt.title('tensorflow.math.sigmiod') plt.xlabel('Input') plt.ylabel('Result') plt.show() Output: Comment More infoAdvertise with us Next Article Python - tensorflow.math.sigmoid() A aman neekhara Follow Improve Article Tags : Machine Learning AI-ML-DS With Python Practice Tags : Machine Learning Similar Reads Python - tensorflow.math.log_sigmoid() 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 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.sin() TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning  neural networks. sin() is used to find element wise sine of x. Syntax: tf.math.sin(x, name) Parameters: x: It's the input tensor. Allowed dtype for this tensor are bfloat16, half, float 1 min read Python - tensorflow.math.rint() TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning  neural networks. rint() is used to find element-wise integer closest to x. Syntax: tf.math.rint(x, name) Parameter: x: It's the input tensor. Allowed dtype for this tensor are bfloat16, 2 min read Python - tensorflow.math.softplus() TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. softplus() is used to compute element wise log(exp(features) + 1). Syntax: tensorflow.math.softplus(features, name) Parameters: features: It's a tensor. Allowed dtypes ar 1 min read Like