Tensorflow.js tf.less() 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.less() function is used to return the tensor of Boolean values for the two specified tensor values i.e. it returns true if the value of the first tensor is less than the second tensor value else returns false. It supports broadcasting.
Parameters: This function accepts two parameters which are illustrated below:
- a: The first input tensor.
- b: The second input tensor. It should have values of the same data type as of Tensor “a”.
Return Value: It returns the tensor of Boolean values i.e. true if the value of the first tensor is less than the second tensor value else returns false.
Tensor [false, true, false, true]
Tensor [false, true, false, true, false]