MCPcopy Index your code
hub / github.com/huggingface/transformers.js / min

Method min

packages/transformers/src/utils/tensor.js:778–792  ·  view source on GitHub ↗
(dim = null, keepdim = false)

Source from the content-addressed store, hash-verified

776 }
777
778 min(dim = null, keepdim = false) {
779 if (dim === null) {
780 // None to reduce over all dimensions.
781 const val = min(this.data)[0];
782 return new Tensor(
783 this.type,
784 [val],
785 [
786 /* scalar */
787 ],
788 );
789 }
790 const [type, result, resultDims] = reduce_helper((a, b) => Math.min(a, b), this, dim, keepdim, Infinity);
791 return new Tensor(type, result, resultDims);
792 }
793
794 max(dim = null, keepdim = false) {
795 if (dim === null) {

Callers 15

_callMethod · 0.80
smart_resizeFunction · 0.80
thumbnailMethod · 0.80
crop_marginMethod · 0.80
cropMethod · 0.80
spectrogramFunction · 0.80
interpolate_dataFunction · 0.80
sliceMethod · 0.80
clamp_Method · 0.80
topkFunction · 0.80

Calls 2

minFunction · 0.90
reduce_helperFunction · 0.85

Tested by

no test coverage detected