Tensorflow.js tf.layers.minimum() Function Last Updated : 21 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. The tf.layers.minimum() function is used to create a layer that is used to compute the element-wise minimum of an Array of inputs. It takes as input a list of tensors, having the same shape. Syntax: tf.layers.minimum (args) Parameters: It takes as input an object: args (Object). It is optional to provide args object as input. Following are the fields you can provide in the args object. inputShape ((null or number)[]): creates an input layer that is inserted before this layer.batchInputShape ((null or number)[]): has the same purpose as the above parameter but if both input shape and batchInputShape are defined, batchInputShape will be preferred.batchSize (number): if both the above parameters are not specified, batch Size is used to construct the batchInputShape.dtype : the data type of the layer. Eg: float32, int32, etc.name (string): it is used to give a name to the layer.weights (tf.Tensor[]): it provides initial weight values.trainable (boolean): it is used to specify whether the weights are updatable by fit. The default value is true. Return Value: It returns element-wise minimum. Example 1: JavaScript const tf = require("@tensorflow/tfjs") // providing input const x = tf.input({shape: [4, 4, 4]}); const y = tf.input({shape: [4, 4, 4]}); // creating required layer const minimumLayer = tf.layers.minimum(); const minimum = minimumLayer.apply([x, y]); console.log(minimum.shape); Output: [ null, 4, 4, 4 ] Example 2: In this example, we will provide the args object as input with the fields of name and trainable. JavaScript const tf = require("@tensorflow/tfjs") // providing input const x = tf.input({shape: [5, 5, 5]}); const y = tf.input({shape: [5, 5, 5]}); const z = tf.input({shape: [5, 5, 5]}); // creating required layer const minimumLayer = tf.layers.minimum({name:"layer1", trainable:false}); const minimum = minimumLayer.apply([x, y, z]); console.log(minimumLayer.name) console.log(minimumLayer.trainable) console.log(minimumLayer.shape); Output: layer1 false [ null, 5, 5, 5 ] Reference: https://js.tensorflow.org/api/latest/#minimum Comment More infoAdvertise with us Next Article Tensorflow.js tf.layers.minimum() Function P parasmadan15 Follow Improve Article Tags : JavaScript Web Technologies Tensorflow.js Tensorflow.js-Merge TensorFlow.js-layers +1 More Similar Reads Tensorflow.js tf.layers.maximum() 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 Node.js. The tf.lay 2 min read Tensorflow.js tf.minimum() 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.minimum() function is used to return the minimum of the two specified tensors element-wise. It supports broadcasting. Syntax: t 2 min read Tensorflow.js tf.layers.reLU() 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.layers.prelu() 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.layers.multiply() 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.layers.multiply() function is used to perform element-wise multiplication of an array of inputs. Syntax: tf.layers.multiply() P 2 min read Tensorflow.js tf.layers.maxPooling3d() 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.maximum() 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.maximum() function is used to return the maximum of the two specified tensors element-wise. It supports broadcasting. Syntax: t 2 min read Tensorflow.js tf.layers.maxPooling2d() 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.layers.maxPooling1d() 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. Tensorflow.js tf.layers.maxPooling1d() function is used for max pooling operation on temporal data. Syntax: tf.layers.maxPooling1d( ar 3 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 Like