Tensorflow.js tf.logSoftmax() Function Last Updated : 18 May, 2021 Comments Improve Suggest changes Like Article Like Report 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.logSoftmax() function is used to compute the log softmax. Syntax: tf.logSoftmax(logits, axis?) Parameters: logits: the logits arrayaxis: The dimension softmax would be performed on Return Value: It returns tf.Tensor Example 1: JavaScript // Importing the tensorflow.js library import * as tf from "@tensorflow/tfjs" const a = tf.tensor1d([3, 2, 6]); a.logSoftmax().print(); Output: Tensor [-3.0658839, -4.0658841, -0.0658839] Example 2: JavaScript // Importing the tensorflow.js library import * as tf from "@tensorflow/tfjs" const a = tf.tensor2d([2, 4, 6, 1, 3,7], [2, 3]); a.logSoftmax().print(); Output: Tensor [[-4.1429315, -2.1429317, -0.1429316], [-6.0205812, -4.0205812, -0.0205811]] Reference: https://js.tensorflow.org/api/latest/#logSoftmax Comment More infoAdvertise with us Next Article Tensorflow.js tf.logSoftmax() Function D dheerchanana2002 Follow Improve Article Tags : JavaScript Web Technologies Tensorflow.js Similar Reads 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.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.max() 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.max() function is used to calculate the maximum value from the specified Tensor across its dimension. It reduces the given inpu 2 min read Tensorflow.js tf.layers.softmax() Function Tensorflow.js is a Google-developed open-source toolkit for executing machine learning models and deep learning neural networks in the browser or on the node platform. It also enables developers to create machine learning models in JavaScript and utilize them directly in the browser or with Node.js. 2 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.stack() 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 helps developers to develop ML models in JavaScript, and use ML directly in the browser or in Node.js. The tf.stack() function is u 2 min read Tensorflow.js tf.logSigmoid() 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 .logSigmoid() function is used to find the log sigmoid of the stated tensor input and is done element wise. S 1 min read Tensorflow.js tf.softplus() Function Tensorflow.js is an open-source library that is developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment. The .softplus() function is used to find softplus of the stated input tensor i.e. log(exp(x) + 1) and is done element w 1 min read Tensorflow.js tf.tan() 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 .tan() function is used to find the tangent of the stated tensor input and is done element wise. Syntax: tf.t 2 min read Tensorflow.js tf.norm() 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.norm() function is used compute the norm of matrices, vectors, and scalar. This function can also compute several other vector 2 min read Like