Tensorflow.js tf.localResponseNormalization() Function Last Updated : 24 Jun, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 .localResponseNormalization() function is used to standardize the stimulation connected with a local neighborhood through or inside the channels. Syntax: tf.localResponseNormalization (x, depthRadius?, bias?, alpha?, beta?) Parameters: x: It is the stated input tensor. Where, the 4D input tensor is considered just as a 3D array in referenceto 1D vectors with the utmost size. Furthermore, each and every vector is standardize individually. It can be of type tf.Tensor3D, tf.Tensor4D, TypedArray, or an array.depthRadius: It is the stated count of side by side channels in the standardization of 1D window. It is optional and it is of type number.bias: It is the constant stated bias expression for the base. It is optional and is of type number.alpha: It is the stated scale factor that is in general positive. It is optional and is of type number.beta: It is the stated exponent which is optional and is of type number. Return Value: It returns tf.Tensor3D, or tf.Tensor4D. Example 1: JavaScript // Importing the tensorflow.js library import * as tf from "@tensorflow/tfjs" // Defining tf.tensor3d input const x = tf.tensor3d([1, 2, 3, 4, 6, 6], [1, 2, 3]); // Calling tf.localResponseNormalization() method // and printing output x.localResponseNormalization().print(); Output: Tensor [[[0.2581989, 0.5163978, 0.7745967], [0.4239992, 0.6359987, 0.6359987]]] Example 2: JavaScript // Importing the tensorflow.js library // import * as tf from "@tensorflow/tfjs" // Calling tf.localResponseNormalization() method // and printing output tf.localResponseNormalization( tf.tensor3d([1.1, 3.2, -3, null, 5, 0], [1, 1, 6]), 4, 3, 2, 1).print(); Output: Tensor [ [[0.0117146, 0.0340788, -0.0319489, 0, 0.0532481, 0],]] Reference: https://js.tensorflow.org/api/latest/#localResponseNormalization Comment More infoAdvertise with us Next Article Tensorflow.js tf.layers.layerNormalization() Function N nidhi1352singh Follow Improve Article Tags : JavaScript Web Technologies Tensorflow.js Similar Reads Tensorflow.js tf.layers.layerNormalization() 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. 3 min read Tensorflow.js tf.randomNormal() 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.randomNormal() functi 2 min read Tensorflow.js tf.oneHot() 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.oneHot() function is used to create a one-hot tf.Tensor. The locations represented by indices take the value as 1 (default valu 2 min read Tensorflow.js tf.sparseToDense() 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.sparseToDense() function is used to convert a specified sparse representation into a dense Tensor. If the given indices get rep 2 min read Tensorflow.js tf.onesLike() 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.onesLike() function is used to create a tf.Tensor with all elements set to 1 with the same shape as the given tensor. Syntax: t 1 min read Tensorflow.js tf.print() 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.print() function is u 2 min read Like