Tensorflow.js tf.lessEqual() 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.lessEqual() 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 or equal to 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 tensor “a”.
Return Value: It returns the tensor of Boolean values i.e. true if the value of the first tensor is less than or equal to the second tensor value else returns false.
Tensor [true, true, false, true]
Tensor [false, true, true, true, false]