Tensorflow.js tf.layers.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.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.
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.
[ null, 4, 4, 4 ]
In this example, we will provide the args object as input with the fields of name and trainable.
layer1 false [ null, 5, 5, 5 ]