Local Minima
is_local_min(input: any[] | Mat | Tensor, dim: Number) : Mat | Tensor
param input
a JS array, matrix or tensor, where you want to find the local minima locations
param dim
0 (row) or 1 (column) - the direction to traverse for finding the local minima
returns - Mat | Tensor
- a matrix or tensor with 1 denoting local min value and 0 denoting not local min
Notice if dim
is 1, then input
must be a 2-d matrix
This function simply finds all the local minimum value locations of the input.