webdnn/math
argmax
argmax(arr: number [] | Float32Array , k?: number ): number []
[math/argsort.ts:15]
Return indices of the top-K largest elements. This implementation is not stable sort.
| Name | Type | Default | Description |
|---|---|---|---|
arr
|
|
array |
|
k
|
number
|
1
|
number of indices |
number []
indices of top-K largest samples
argmin
argmin(arr: number [] | Float32Array | Int32Array , k?: number ): number []
[math/argsort.ts:70]
Return indices of the top-K smallest elements. This implementation is not stable sort.
| Name | Type | Default | Description |
|---|---|---|---|
arr
|
|
array |
|
k
|
number
|
1
|
number of indices |
number []
indices of top-K smallest samples
Module
WebDNN.Mathprovides basic mathematics operations for pre/post-processing.