Tensorflow.js tf.logSigmoid() Function Last Updated : 12 May, 2021 Comments Improve Suggest changes Like Article Like Report Tensorflow.js is an open-source library that is being developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment. The .logSigmoid() function is used to find the log sigmoid of the stated tensor input and is done element wise. Syntax: tf.logSigmoid(x) Parameters: This function accepts three parameters which are illustrated below: x: It is the tensor input, and it can be of type tf.Tensor, or TypedArray, or Array. Return Value: It returns the tf.Tensor object. Example 1: JavaScript // Importing the tensorflow.js library import * as tf from "@tensorflow/tfjs" // Defining tensor input elements const y = tf.tensor1d([1, 15, 38, Math.E]); // Calling logSigmoid() method and // printing output y.logSigmoid().print(); Output: Tensor [-0.3132617, -3e-7, 0, -0.0639021] Example 2: In this example, the parameter is passed directly to the logSigmoid function. JavaScript // Importing the tensorflow.js library import * as tf from "@tensorflow/tfjs" // Defining float values var val = [0.5, 1.5, .66]; // Calling tensor1d method const y = tf.tensor1d(val); // Calling logSigmoid() method var res = tf.logSigmoid(y) // Printing output res.print(); Output: Tensor [-0.474077, -0.2014133, -0.4166367] Comment More infoAdvertise with us Next Article Tensorflow.js tf.logSigmoid() Function N nidhi1352singh Follow Improve Article Tags : JavaScript Web Technologies Tensorflow.js Similar Reads Tensorflow.js tf.sigmoid() Function Tensorflow.js is an open-source library that is being developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment. The .sigmoid() function is used to find the sigmoid of the stated tensor input i.e. 1 / (1 + exp(-x)) and is done 1 min read Tensorflow.js tf.log() Function Tensorflow.js is an open-source library that is being developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment. The .log() function is used to find the natural logarithm of the stated tensor input i.e. ln(x) and is done eleme 1 min read Tensorflow.js tf.log1p() Function Tensorflow.js is an open-source library that is being developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment. The .log1p() function is used to find the natural logarithm of the stated tensor input plus one i.e. ln(1 + x) an 1 min read Tensorflow.js tf.logSumExp() Function Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment. The tf.logSumExp() function is used to calculate log sum exp of elements of a Tensor across its dimension. It reduces the given input 2 min read Tensorflow.js tf.logSoftmax() Function Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment. It also helps the developers to develop ML models in JavaScript language and can use ML directly in the browser or in Node.js. The tf. 1 min read Like