@genai-fi/nanogpt 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Generator.js +7 -7
- package/dist/NanoGPTModel.js +70 -121
- package/dist/RealDiv-BYViZwhN.js +540 -0
- package/dist/Reshape-t7Kcikjk.js +127 -0
- package/dist/TeachableLLM.d.ts +2 -0
- package/dist/TeachableLLM.js +34 -27
- package/dist/{TiedEmbedding-BhxWO8QR.js → TiedEmbedding-9WeDwvjO.js} +12 -13
- package/dist/{axis_util-D17qZRQm.js → axis_util-Bu4h7XWV.js} +14 -12
- package/dist/{broadcast_to-BMQLjvt_.js → broadcast_to-DARN-DBD.js} +2 -2
- package/dist/{concat-DhZfF1GY.js → concat-5aPGqw3Z.js} +3 -3
- package/dist/{dataset-oilnemHf.js → dataset-pgqp-YfL.js} +3 -3
- package/dist/{dropout-CrMQPCeG.js → dropout-Bciw46HT.js} +7 -7
- package/dist/{gather-DZCMHZuN.js → gather-DjyCjmOD.js} +1 -1
- package/dist/gpgpu_math-CNslybmD.js +3115 -0
- package/dist/{index-bMBtI-WR.js → index-BAzbokzv.js} +846 -649
- package/dist/{kernel_funcs_utils-CNmjLWnB.js → kernel_funcs_utils-CUxJCg0g.js} +232 -138
- package/dist/layers/BaseLayer.js +2 -2
- package/dist/layers/CausalSelfAttention.js +6 -6
- package/dist/layers/MLP.js +5 -5
- package/dist/layers/RMSNorm.js +3 -3
- package/dist/layers/RoPECache.js +13 -33
- package/dist/layers/TiedEmbedding.js +6 -7
- package/dist/layers/TransformerBlock.js +1 -1
- package/dist/loader/load.d.ts +13 -0
- package/dist/loader/load.js +27 -0
- package/dist/loader/loadHF.d.ts +7 -0
- package/dist/loader/loadHF.js +22 -0
- package/dist/{utilities/load.d.ts → loader/loadTransformers.d.ts} +11 -11
- package/dist/loader/loadTransformers.js +28 -0
- package/dist/loader/newZipLoad.d.ts +8 -0
- package/dist/loader/newZipLoad.js +21 -0
- package/dist/loader/oldZipLoad.d.ts +7 -0
- package/dist/loader/oldZipLoad.js +76 -0
- package/dist/{log_sum_exp-BHdkCb4s.js → log_sum_exp-YEo2h3gb.js} +14 -14
- package/dist/main.js +23 -20
- package/dist/{mat_mul-BsrLfy81.js → mat_mul-7121rsJk.js} +1 -1
- package/dist/{max-DechV4Bc.js → max-DtlIuVeW.js} +1 -1
- package/dist/mulmat_packed_gpu-D4nKF7Je.js +71 -0
- package/dist/{norm-B9hWHZH1.js → norm-CzltS9Fz.js} +16 -16
- package/dist/{ones-g0K8jVwm.js → ones-BBlSRqn1.js} +2 -2
- package/dist/ops/appendCache.js +3 -3
- package/dist/ops/attentionMask.js +1 -1
- package/dist/ops/cpu/appendCache.js +2 -2
- package/dist/ops/cpu/attentionMask.js +6 -6
- package/dist/ops/cpu/fusedSoftmax.js +2 -2
- package/dist/ops/cpu/gatherSub.js +9 -9
- package/dist/ops/cpu/gelu.js +1 -1
- package/dist/ops/cpu/matMulGelu.js +1 -1
- package/dist/ops/cpu/matMulMul.js +1 -1
- package/dist/ops/cpu/mulDropout.js +1 -1
- package/dist/ops/cpu/normRMS.js +1 -1
- package/dist/ops/cpu/qkv.js +3 -3
- package/dist/ops/cpu/rope.js +5 -5
- package/dist/ops/cpu/scatterSub.js +17 -48
- package/dist/ops/fusedSoftmax.js +1 -1
- package/dist/ops/gatherSub.js +1 -1
- package/dist/ops/gelu.js +1 -1
- package/dist/ops/grads/attentionMask.js +1 -1
- package/dist/ops/grads/fusedSoftmax.js +4 -4
- package/dist/ops/grads/gelu.js +1 -1
- package/dist/ops/grads/matMulGelu.js +1 -1
- package/dist/ops/grads/normRMS.js +1 -1
- package/dist/ops/grads/qkv.js +1 -1
- package/dist/ops/grads/rope.js +1 -1
- package/dist/ops/matMulGelu.js +1 -1
- package/dist/ops/matMulMul.js +1 -1
- package/dist/ops/mulDrop.js +1 -1
- package/dist/ops/node/sparseCrossEntropy.js +1 -1
- package/dist/ops/normRMS.js +1 -1
- package/dist/ops/qkv.js +1 -1
- package/dist/ops/rope.js +8 -4
- package/dist/ops/scatterSub.js +1 -1
- package/dist/ops/webgl/appendCache.js +1 -1
- package/dist/ops/webgl/attentionMask.js +1 -1
- package/dist/ops/webgl/fusedSoftmax.js +29 -560
- package/dist/ops/webgl/gatherSub.js +1 -1
- package/dist/ops/webgl/gelu.js +2 -2
- package/dist/ops/webgl/log.js +3 -3
- package/dist/ops/webgl/matMulGelu.js +46 -113
- package/dist/ops/webgl/matMulMul.js +1 -1
- package/dist/ops/webgl/mulDropout.js +1 -1
- package/dist/ops/webgl/normRMS.js +2 -2
- package/dist/ops/webgl/qkv.js +1 -1
- package/dist/ops/webgl/rope.js +1 -1
- package/dist/ops/webgl/scatterSub.js +1 -1
- package/dist/{ops-Mv7Ta72x.js → ops-C0sQEcPw.js} +117 -109
- package/dist/{random_width-BBAWzDym.js → random_width-DWzaOgrn.js} +6925 -6291
- package/dist/{range-DMaG9A3G.js → range-DYsrnfiy.js} +1 -1
- package/dist/{gpgpu_math-Ctc31slO.js → reciprocal-CJQeasVa.js} +7 -5
- package/dist/register_all_kernels-BfFCQAqs.js +21397 -0
- package/dist/{reshape-T4yDEqoF.js → reshape-krWGKraP.js} +1 -1
- package/dist/scatter_nd_util-93ln7Hut.js +46 -0
- package/dist/selu_util-sntGesxr.js +740 -0
- package/dist/{shared-XNAoXhOa.js → shared-Ca6iDobD.js} +1462 -1089
- package/dist/{sin-EEhbrRO_.js → sin-D_h-qCSx.js} +1 -1
- package/dist/{softmax-B2_IKPDR.js → softmax-fsdtf6JC.js} +1 -1
- package/dist/{split-dcks18H1.js → split-eiktj-6L.js} +1 -1
- package/dist/{stack-lpJ5kYvE.js → stack-dfEEz2OY.js} +2 -2
- package/dist/{sum-CutF5lj2.js → sum-BE_Irnim.js} +1 -1
- package/dist/{tensor-C15NA2LA.js → tensor-Xyi595sG.js} +1 -1
- package/dist/{tensor2d-DZ_e5eKM.js → tensor2d-CPEkynbH.js} +1 -1
- package/dist/training/AdamExt.js +1 -1
- package/dist/training/DatasetBuilder.js +2 -2
- package/dist/training/FullTrainer.js +1 -1
- package/dist/training/Trainer.js +3 -3
- package/dist/training/sparseCrossEntropy.js +5 -5
- package/dist/utilities/dummy.d.ts +6 -0
- package/dist/utilities/dummy.js +31 -10
- package/dist/utilities/generate.js +3 -3
- package/dist/utilities/profile.d.ts +5 -0
- package/dist/utilities/profile.js +10 -7
- package/dist/utilities/safetensors.js +2 -2
- package/dist/utilities/save.js +1 -1
- package/dist/utilities/weights.js +2 -2
- package/dist/{variable-CdRKKp8x.js → variable-wSS22xj5.js} +1 -1
- package/dist/{zeros-CAbHfODe.js → zeros-YJDE7oRb.js} +4 -4
- package/package.json +2 -8
- package/dist/Reshape-CLOrdpve.js +0 -212
- package/dist/slice_util-Ddk0uxGJ.js +0 -49
- package/dist/tfjs_backend-BDb8r9qx.js +0 -1010
- package/dist/utilities/load.js +0 -99
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { o as h,
|
|
2
|
-
import { r as _ } from "./reshape-
|
|
3
|
-
import { s as un } from "./split-
|
|
4
|
-
import { s as q } from "./sum-
|
|
5
|
-
import { b as X } from "./broadcast_to-
|
|
6
|
-
import { r as
|
|
7
|
-
import { t as Ln } from "./tensor-
|
|
8
|
-
import { s as Y } from "./stack-
|
|
9
|
-
import { c as Xn, z as Qn } from "./zeros-
|
|
10
|
-
import { n as ln } from "./norm-
|
|
11
|
-
import { c as Q } from "./concat-
|
|
12
|
-
import { m as T } from "./mat_mul-
|
|
13
|
-
import { t as H } from "./tensor2d-
|
|
1
|
+
import { o as h, q as l, E as f, aO as hn, i as p, aP as fn, h as w, aQ as bn, aR as dn, aS as gn, I as $n, ah as xn, B as j, aT as kn, aU as yn, aV as In, aW as _n, aX as En, aY as Mn, aZ as Nn, L as V, a_ as An, a$ as Tn, b0 as Sn, aK as wn, V as zn, O as Bn, Q as qn, b1 as Kn, t as Rn, b2 as J, b3 as Gn, b4 as Vn, b5 as Dn, b6 as Pn, b7 as vn, b8 as jn, s as Fn, b9 as On, ba as Wn, a as k, a7 as Z, aj as R, f as Yn, b as S, bb as Cn, H as L, d as Jn } from "./index-BAzbokzv.js";
|
|
2
|
+
import { r as _ } from "./reshape-krWGKraP.js";
|
|
3
|
+
import { s as un } from "./split-eiktj-6L.js";
|
|
4
|
+
import { s as q } from "./sum-BE_Irnim.js";
|
|
5
|
+
import { b as X } from "./broadcast_to-DARN-DBD.js";
|
|
6
|
+
import { r as W } from "./range-DYsrnfiy.js";
|
|
7
|
+
import { t as Ln } from "./tensor-Xyi595sG.js";
|
|
8
|
+
import { s as Y } from "./stack-dfEEz2OY.js";
|
|
9
|
+
import { c as Xn, z as Qn } from "./zeros-YJDE7oRb.js";
|
|
10
|
+
import { n as ln } from "./norm-CzltS9Fz.js";
|
|
11
|
+
import { c as Q } from "./concat-5aPGqw3Z.js";
|
|
12
|
+
import { m as T } from "./mat_mul-7121rsJk.js";
|
|
13
|
+
import { t as H } from "./tensor2d-CPEkynbH.js";
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2018 Google LLC. All Rights Reserved.
|
|
@@ -75,14 +75,14 @@ const Un = /* @__PURE__ */ h({ bincount_: Zn });
|
|
|
75
75
|
* =============================================================================
|
|
76
76
|
*/
|
|
77
77
|
function ne(r, t, n) {
|
|
78
|
-
const e = l(t, "a", "where"), s = l(n, "b", "where"), a = l(r, "condition", "where", "bool"), o = w(w(a.shape, e.shape), s.shape), i = X(a, o), u = X(e, o), c = X(s, o),
|
|
78
|
+
const e = l(t, "a", "where"), s = l(n, "b", "where"), a = l(r, "condition", "where", "bool"), o = w(w(a.shape, e.shape), s.shape), i = X(a, o), u = X(e, o), c = X(s, o), b = {
|
|
79
79
|
condition: i,
|
|
80
80
|
t: u,
|
|
81
81
|
e: c
|
|
82
82
|
};
|
|
83
|
-
return f.runKernel(
|
|
83
|
+
return f.runKernel(bn, b);
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const G = /* @__PURE__ */ h({ where_: ne });
|
|
86
86
|
/**
|
|
87
87
|
* @license
|
|
88
88
|
* Copyright 2021 Google LLC. All Rights Reserved.
|
|
@@ -101,7 +101,7 @@ const R = /* @__PURE__ */ h({ where_: ne });
|
|
|
101
101
|
*/
|
|
102
102
|
function ee(r, ...t) {
|
|
103
103
|
const n = t.map((s, a) => l(s, `tensors${a}`, "einsum")), e = { equation: r };
|
|
104
|
-
return f.runKernel(
|
|
104
|
+
return f.runKernel(dn, n, e);
|
|
105
105
|
}
|
|
106
106
|
const v = /* @__PURE__ */ h({ einsum_: ee });
|
|
107
107
|
/**
|
|
@@ -149,7 +149,7 @@ function te(r, t) {
|
|
|
149
149
|
const e = { x: n }, s = { reps: t };
|
|
150
150
|
return f.runKernel($n, e, s);
|
|
151
151
|
}
|
|
152
|
-
const
|
|
152
|
+
const O = /* @__PURE__ */ h({ tile_: te });
|
|
153
153
|
/**
|
|
154
154
|
* @license
|
|
155
155
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
@@ -175,11 +175,11 @@ function re(r, t, n, e = "float32") {
|
|
|
175
175
|
if (n == null)
|
|
176
176
|
return o;
|
|
177
177
|
if (n.length === 1)
|
|
178
|
-
return
|
|
178
|
+
return O(K(o, 0), [n[0], 1, 1]);
|
|
179
179
|
if (n.length === 2)
|
|
180
|
-
return
|
|
180
|
+
return O(K(K(o, 0), 0), [n[0], n[1], 1, 1]);
|
|
181
181
|
if (n.length === 3)
|
|
182
|
-
return
|
|
182
|
+
return O(K(K(K(o, 0), 0), 0), [
|
|
183
183
|
n[0],
|
|
184
184
|
n[1],
|
|
185
185
|
n[2],
|
|
@@ -345,7 +345,7 @@ function fe(r, t) {
|
|
|
345
345
|
const s = { a: n, b: e };
|
|
346
346
|
return f.runKernel(Nn, s);
|
|
347
347
|
}
|
|
348
|
-
const
|
|
348
|
+
const be = /* @__PURE__ */ h({ logicalAnd_: fe });
|
|
349
349
|
/**
|
|
350
350
|
* @license
|
|
351
351
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
@@ -362,13 +362,13 @@ const de = /* @__PURE__ */ h({ logicalAnd_: fe });
|
|
|
362
362
|
* limitations under the License.
|
|
363
363
|
* =============================================================================
|
|
364
364
|
*/
|
|
365
|
-
function
|
|
365
|
+
function de(r, t) {
|
|
366
366
|
let n = l(r, "a", "minimum"), e = l(t, "b", "minimum");
|
|
367
|
-
[n, e] = j(n, e), n.dtype === "bool" && (n =
|
|
367
|
+
[n, e] = j(n, e), n.dtype === "bool" && (n = V(n, "int32"), e = V(e, "int32")), w(n.shape, e.shape);
|
|
368
368
|
const s = { a: n, b: e };
|
|
369
369
|
return f.runKernel(An, s);
|
|
370
370
|
}
|
|
371
|
-
const rn = /* @__PURE__ */ h({ minimum_:
|
|
371
|
+
const rn = /* @__PURE__ */ h({ minimum_: de });
|
|
372
372
|
/**
|
|
373
373
|
* @license
|
|
374
374
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
@@ -501,7 +501,7 @@ function Ee(r, t, n) {
|
|
|
501
501
|
}), e.rank <= 1)
|
|
502
502
|
return e.clone();
|
|
503
503
|
const s = { x: e }, a = { perm: t };
|
|
504
|
-
return e.dtype === "complex64" ?
|
|
504
|
+
return e.dtype === "complex64" ? Rn(() => {
|
|
505
505
|
let o = $e(e), i = le(e);
|
|
506
506
|
return o = f.runKernel(J, { x: o }, a), i = f.runKernel(J, { x: i }, a), n && (i = nn(i)), Xn(o, i);
|
|
507
507
|
}) : f.runKernel(J, s, a);
|
|
@@ -526,8 +526,8 @@ const an = /* @__PURE__ */ h({ transpose_: Ee });
|
|
|
526
526
|
function Me(r, t, n, e, s = "bilinear", a = 0) {
|
|
527
527
|
const o = l(r, "image", "cropAndResize"), i = l(t, "boxes", "cropAndResize", "float32"), u = l(n, "boxInd", "cropAndResize", "int32"), c = i.shape[0];
|
|
528
528
|
p(o.rank === 4, () => `Error in cropAndResize: image must be rank 4,but got rank ${o.rank}.`), p(i.rank === 2 && i.shape[1] === 4, () => `Error in cropAndResize: boxes must be have size [${c},4] but had shape ${i.shape}.`), p(u.rank === 1 && u.shape[0] === c, () => `Error in cropAndResize: boxInd must be have size [${c}] but had shape ${i.shape}.`), p(e.length === 2, () => `Error in cropAndResize: cropSize must be of length 2, but got length ${e.length}.`), p(e[0] >= 1 && e[1] >= 1, () => `cropSize must be atleast [1,1], but was ${e}`), p(s === "bilinear" || s === "nearest", () => `method must be bilinear or nearest, but was ${s}`);
|
|
529
|
-
const
|
|
530
|
-
return f.runKernel(
|
|
529
|
+
const b = { image: o, boxes: i, boxInd: u }, m = { method: s, extrapolationValue: a, cropSize: e };
|
|
530
|
+
return f.runKernel(Gn, b, m);
|
|
531
531
|
}
|
|
532
532
|
const Ne = /* @__PURE__ */ h({ cropAndResize_: Me });
|
|
533
533
|
/**
|
|
@@ -550,7 +550,7 @@ function Ae(r) {
|
|
|
550
550
|
const t = l(r, "image", "flipLeftRight", "float32");
|
|
551
551
|
p(t.rank === 4, () => `Error in flipLeftRight: image must be rank 4,but got rank ${t.rank}.`);
|
|
552
552
|
const n = { image: t };
|
|
553
|
-
return f.runKernel(
|
|
553
|
+
return f.runKernel(Vn, n, {});
|
|
554
554
|
}
|
|
555
555
|
const Te = /* @__PURE__ */ h({ flipLeftRight_: Ae });
|
|
556
556
|
/**
|
|
@@ -573,7 +573,7 @@ function Se(r) {
|
|
|
573
573
|
const t = l(r, "image", "grayscaleToRGB"), n = t.rank - 1, e = t.shape[n];
|
|
574
574
|
p(t.rank >= 2, () => `Error in grayscaleToRGB: images must be at least rank 2, but got rank ${t.rank}.`), p(e === 1, () => `Error in grayscaleToRGB: last dimension of a grayscale image should be size 1, but got size ${e}.`);
|
|
575
575
|
const s = new Array(t.rank);
|
|
576
|
-
return s.fill(1, 0, n), s[n] = 3,
|
|
576
|
+
return s.fill(1, 0, n), s[n] = 3, O(t, s);
|
|
577
577
|
}
|
|
578
578
|
const we = /* @__PURE__ */ h({ grayscaleToRGB_: Se });
|
|
579
579
|
/**
|
|
@@ -595,7 +595,7 @@ const we = /* @__PURE__ */ h({ grayscaleToRGB_: Se });
|
|
|
595
595
|
function ze(r) {
|
|
596
596
|
const t = l(r, "image", "RGBToGrayscale"), n = t.rank - 1, e = t.shape[n];
|
|
597
597
|
p(t.rank >= 2, () => `Error in RGBToGrayscale: images must be at least rank 2, but got rank ${t.rank}.`), p(e === 3, () => `Error in RGBToGrayscale: last dimension of an RGB image should be size 3, but got size ${e}.`);
|
|
598
|
-
const s = t.dtype, a =
|
|
598
|
+
const s = t.dtype, a = V(t, "float32"), o = N([0.2989, 0.587, 0.114]);
|
|
599
599
|
let i;
|
|
600
600
|
switch (t.rank) {
|
|
601
601
|
case 2:
|
|
@@ -616,7 +616,7 @@ function ze(r) {
|
|
|
616
616
|
default:
|
|
617
617
|
throw new Error("Not a valid tensor rank.");
|
|
618
618
|
}
|
|
619
|
-
return i = K(i, -1),
|
|
619
|
+
return i = K(i, -1), V(i, s);
|
|
620
620
|
}
|
|
621
621
|
const Be = /* @__PURE__ */ h({ rgbToGrayscale_: ze });
|
|
622
622
|
/**
|
|
@@ -639,7 +639,7 @@ function qe(r, t, n = 0, e = 0.5) {
|
|
|
639
639
|
const s = l(r, "image", "rotateWithOffset", "float32");
|
|
640
640
|
p(s.rank === 4, () => `Error in rotateWithOffset: image must be rank 4,but got rank ${s.rank}.`);
|
|
641
641
|
const a = { image: s }, o = { radians: t, fillValue: n, center: e };
|
|
642
|
-
return f.runKernel(
|
|
642
|
+
return f.runKernel(Dn, a, o);
|
|
643
643
|
}
|
|
644
644
|
const Ke = /* @__PURE__ */ h({ rotateWithOffset_: qe });
|
|
645
645
|
/**
|
|
@@ -658,7 +658,7 @@ const Ke = /* @__PURE__ */ h({ rotateWithOffset_: qe });
|
|
|
658
658
|
* limitations under the License.
|
|
659
659
|
* =============================================================================
|
|
660
660
|
*/
|
|
661
|
-
function
|
|
661
|
+
function D(r, t, n, e, s, a) {
|
|
662
662
|
e == null && (e = 0.5), s == null && (s = Number.NEGATIVE_INFINITY), a == null && (a = 0);
|
|
663
663
|
const o = r.shape[0];
|
|
664
664
|
return n = Math.min(n, o), p(0 <= e && e <= 1, () => `iouThreshold must be in [0, 1], but was '${e}'`), p(r.rank === 2, () => `boxes must be a 2D tensor, but was of rank '${r.rank}'`), p(r.shape[1] === 4, () => `boxes must have 4 columns, but 2nd dimension was ${r.shape[1]}`), p(t.rank === 1, () => "scores must be a 1D tensor"), p(t.shape[0] === o, () => `scores has incompatible shape with boxes. Expected ${o}, but was ${t.shape[0]}`), p(0 <= a && a <= 1, () => `softNmsSigma must be in [0, 1], but was '${a}'`), { maxOutputSize: n, iouThreshold: e, scoreThreshold: s, softNmsSigma: a };
|
|
@@ -679,13 +679,13 @@ function P(r, t, n, e, s, a) {
|
|
|
679
679
|
* limitations under the License.
|
|
680
680
|
* =============================================================================
|
|
681
681
|
*/
|
|
682
|
-
function
|
|
683
|
-
const a = l(r, "boxes", "nonMaxSuppression", "float32"), o = l(t, "scores", "nonMaxSuppression", "float32"), i =
|
|
682
|
+
function Re(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY) {
|
|
683
|
+
const a = l(r, "boxes", "nonMaxSuppression", "float32"), o = l(t, "scores", "nonMaxSuppression", "float32"), i = D(a, o, n, e, s);
|
|
684
684
|
n = i.maxOutputSize, e = i.iouThreshold, s = i.scoreThreshold;
|
|
685
685
|
const u = { maxOutputSize: n, iouThreshold: e, scoreThreshold: s };
|
|
686
|
-
return f.runKernel(
|
|
686
|
+
return f.runKernel(Pn, { boxes: a, scores: o }, u);
|
|
687
687
|
}
|
|
688
|
-
const
|
|
688
|
+
const Ge = /* @__PURE__ */ h({ nonMaxSuppression_: Re });
|
|
689
689
|
/**
|
|
690
690
|
* @license
|
|
691
691
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
@@ -702,14 +702,14 @@ const Re = /* @__PURE__ */ h({ nonMaxSuppression_: Ge });
|
|
|
702
702
|
* limitations under the License.
|
|
703
703
|
* =============================================================================
|
|
704
704
|
*/
|
|
705
|
-
function
|
|
706
|
-
const e =
|
|
705
|
+
function Ve(r, t, n) {
|
|
706
|
+
const e = De(r, t, n), s = e < 0 ? -(e + 1) : e;
|
|
707
707
|
r.splice(s, 0, t);
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
return ve(r, t, n ||
|
|
709
|
+
function De(r, t, n) {
|
|
710
|
+
return ve(r, t, n || Pe);
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function Pe(r, t) {
|
|
713
713
|
return r > t ? 1 : r < t ? -1 : 0;
|
|
714
714
|
}
|
|
715
715
|
function ve(r, t, n) {
|
|
@@ -762,7 +762,7 @@ function Fe(r, t, n, e, s, a) {
|
|
|
762
762
|
/* returnValidOutputs */
|
|
763
763
|
);
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function Oe(r, t, n, e, s, a) {
|
|
766
766
|
return en(
|
|
767
767
|
r,
|
|
768
768
|
t,
|
|
@@ -776,36 +776,36 @@ function We(r, t, n, e, s, a) {
|
|
|
776
776
|
}
|
|
777
777
|
function en(r, t, n, e, s, a, o = !1, i = !1, u = !1) {
|
|
778
778
|
const c = [];
|
|
779
|
-
for (let
|
|
780
|
-
t[
|
|
779
|
+
for (let d = 0; d < t.length; d++)
|
|
780
|
+
t[d] > s && c.push({ score: t[d], boxIndex: d, suppressBeginIndex: 0 });
|
|
781
781
|
c.sort(on);
|
|
782
|
-
const
|
|
782
|
+
const b = a > 0 ? -0.5 / a : 0, m = [], $ = [];
|
|
783
783
|
for (; m.length < n && c.length > 0; ) {
|
|
784
|
-
const
|
|
784
|
+
const d = c.pop(), { score: E, boxIndex: I, suppressBeginIndex: A } = d;
|
|
785
785
|
if (E < s)
|
|
786
786
|
break;
|
|
787
787
|
let z = !1;
|
|
788
788
|
for (let B = m.length - 1; B >= A; --B) {
|
|
789
|
-
const
|
|
790
|
-
if (
|
|
789
|
+
const P = We(r, I, m[B]);
|
|
790
|
+
if (P >= e) {
|
|
791
791
|
z = !0;
|
|
792
792
|
break;
|
|
793
793
|
}
|
|
794
|
-
if (
|
|
794
|
+
if (d.score = d.score * Ye(e, b, P), d.score <= s)
|
|
795
795
|
break;
|
|
796
796
|
}
|
|
797
|
-
|
|
797
|
+
d.suppressBeginIndex = m.length, z || (d.score === E ? (m.push(I), $.push(d.score)) : d.score > s && Ve(c, d, on));
|
|
798
798
|
}
|
|
799
799
|
const g = m.length, x = n - g;
|
|
800
800
|
i && x > 0 && (m.push(...new Array(x).fill(0)), $.push(...new Array(x).fill(0)));
|
|
801
801
|
const y = { selectedIndices: m };
|
|
802
802
|
return o && (y.selectedScores = $), u && (y.validOutputs = g), y;
|
|
803
803
|
}
|
|
804
|
-
function
|
|
805
|
-
const e = r.subarray(t * 4, t * 4 + 4), s = r.subarray(n * 4, n * 4 + 4), a = Math.min(e[0], e[2]), o = Math.min(e[1], e[3]), i = Math.max(e[0], e[2]), u = Math.max(e[1], e[3]), c = Math.min(s[0], s[2]),
|
|
804
|
+
function We(r, t, n) {
|
|
805
|
+
const e = r.subarray(t * 4, t * 4 + 4), s = r.subarray(n * 4, n * 4 + 4), a = Math.min(e[0], e[2]), o = Math.min(e[1], e[3]), i = Math.max(e[0], e[2]), u = Math.max(e[1], e[3]), c = Math.min(s[0], s[2]), b = Math.min(s[1], s[3]), m = Math.max(s[0], s[2]), $ = Math.max(s[1], s[3]), g = (i - a) * (u - o), x = (m - c) * ($ - b);
|
|
806
806
|
if (g <= 0 || x <= 0)
|
|
807
807
|
return 0;
|
|
808
|
-
const y = Math.max(a, c),
|
|
808
|
+
const y = Math.max(a, c), d = Math.max(o, b), E = Math.min(i, m), I = Math.min(u, $), A = Math.max(E - y, 0) * Math.max(I - d, 0);
|
|
809
809
|
return A / (g + x - A);
|
|
810
810
|
}
|
|
811
811
|
function Ye(r, t, n) {
|
|
@@ -832,9 +832,9 @@ function on(r, t) {
|
|
|
832
832
|
* =============================================================================
|
|
833
833
|
*/
|
|
834
834
|
async function Ce(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY) {
|
|
835
|
-
const a = l(r, "boxes", "nonMaxSuppressionAsync"), o = l(t, "scores", "nonMaxSuppressionAsync"), i =
|
|
835
|
+
const a = l(r, "boxes", "nonMaxSuppressionAsync"), o = l(t, "scores", "nonMaxSuppressionAsync"), i = D(a, o, n, e, s);
|
|
836
836
|
n = i.maxOutputSize, e = i.iouThreshold, s = i.scoreThreshold;
|
|
837
|
-
const u = await Promise.all([a.data(), o.data()]), c = u[0],
|
|
837
|
+
const u = await Promise.all([a.data(), o.data()]), c = u[0], b = u[1], { selectedIndices: m } = je(c, b, n, e, s);
|
|
838
838
|
return a !== r && a.dispose(), o !== t && o.dispose(), N(m, "int32");
|
|
839
839
|
}
|
|
840
840
|
const Je = Ce;
|
|
@@ -855,9 +855,9 @@ const Je = Ce;
|
|
|
855
855
|
* =============================================================================
|
|
856
856
|
*/
|
|
857
857
|
function Le(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY, a = 0) {
|
|
858
|
-
const o = l(r, "boxes", "nonMaxSuppression"), i = l(t, "scores", "nonMaxSuppression"), u =
|
|
858
|
+
const o = l(r, "boxes", "nonMaxSuppression"), i = l(t, "scores", "nonMaxSuppression"), u = D(o, i, n, e, s, a);
|
|
859
859
|
n = u.maxOutputSize, e = u.iouThreshold, s = u.scoreThreshold, a = u.softNmsSigma;
|
|
860
|
-
const c = { boxes: o, scores: i },
|
|
860
|
+
const c = { boxes: o, scores: i }, b = { maxOutputSize: n, iouThreshold: e, scoreThreshold: s, softNmsSigma: a }, m = f.runKernel(vn, c, b);
|
|
861
861
|
return { selectedIndices: m[0], selectedScores: m[1] };
|
|
862
862
|
}
|
|
863
863
|
const Xe = /* @__PURE__ */ h({ nonMaxSuppressionWithScore_: Le });
|
|
@@ -878,9 +878,9 @@ const Xe = /* @__PURE__ */ h({ nonMaxSuppressionWithScore_: Le });
|
|
|
878
878
|
* =============================================================================
|
|
879
879
|
*/
|
|
880
880
|
async function Qe(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY, a = 0) {
|
|
881
|
-
const o = l(r, "boxes", "nonMaxSuppressionAsync"), i = l(t, "scores", "nonMaxSuppressionAsync"), u =
|
|
881
|
+
const o = l(r, "boxes", "nonMaxSuppressionAsync"), i = l(t, "scores", "nonMaxSuppressionAsync"), u = D(o, i, n, e, s, a);
|
|
882
882
|
n = u.maxOutputSize, e = u.iouThreshold, s = u.scoreThreshold, a = u.softNmsSigma;
|
|
883
|
-
const c = await Promise.all([o.data(), i.data()]),
|
|
883
|
+
const c = await Promise.all([o.data(), i.data()]), b = c[0], m = c[1], { selectedIndices: $, selectedScores: g } = Oe(b, m, n, e, s, a);
|
|
884
884
|
return o !== r && o.dispose(), i !== t && i.dispose(), {
|
|
885
885
|
selectedIndices: N($, "int32"),
|
|
886
886
|
selectedScores: N(g)
|
|
@@ -904,7 +904,7 @@ const He = Qe;
|
|
|
904
904
|
* =============================================================================
|
|
905
905
|
*/
|
|
906
906
|
function Ze(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY, a = !1) {
|
|
907
|
-
const o = l(r, "boxes", "nonMaxSuppression"), i = l(t, "scores", "nonMaxSuppression"), u =
|
|
907
|
+
const o = l(r, "boxes", "nonMaxSuppression"), i = l(t, "scores", "nonMaxSuppression"), u = D(
|
|
908
908
|
o,
|
|
909
909
|
i,
|
|
910
910
|
n,
|
|
@@ -912,9 +912,9 @@ function Ze(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY, a = !1) {
|
|
|
912
912
|
s,
|
|
913
913
|
null
|
|
914
914
|
/* softNmsSigma */
|
|
915
|
-
), c = u.maxOutputSize,
|
|
915
|
+
), c = u.maxOutputSize, b = u.iouThreshold, m = u.scoreThreshold, $ = { boxes: o, scores: i }, g = {
|
|
916
916
|
maxOutputSize: c,
|
|
917
|
-
iouThreshold:
|
|
917
|
+
iouThreshold: b,
|
|
918
918
|
scoreThreshold: m,
|
|
919
919
|
padToMaxOutputSize: a
|
|
920
920
|
}, x = f.runKernel(jn, $, g);
|
|
@@ -938,7 +938,7 @@ const Ue = /* @__PURE__ */ h({ nonMaxSuppressionPadded_: Ze });
|
|
|
938
938
|
* =============================================================================
|
|
939
939
|
*/
|
|
940
940
|
async function ns(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY, a = !1) {
|
|
941
|
-
const o = l(r, "boxes", "nonMaxSuppressionAsync"), i = l(t, "scores", "nonMaxSuppressionAsync"), u =
|
|
941
|
+
const o = l(r, "boxes", "nonMaxSuppressionAsync"), i = l(t, "scores", "nonMaxSuppressionAsync"), u = D(
|
|
942
942
|
o,
|
|
943
943
|
i,
|
|
944
944
|
n,
|
|
@@ -946,7 +946,7 @@ async function ns(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY, a = !1) {
|
|
|
946
946
|
s,
|
|
947
947
|
null
|
|
948
948
|
/* softNmsSigma */
|
|
949
|
-
), c = u.maxOutputSize,
|
|
949
|
+
), c = u.maxOutputSize, b = u.iouThreshold, m = u.scoreThreshold, [$, g] = await Promise.all([o.data(), i.data()]), { selectedIndices: x, validOutputs: y } = Fe($, g, c, b, m, a);
|
|
950
950
|
return o !== r && o.dispose(), i !== t && i.dispose(), {
|
|
951
951
|
selectedIndices: N(x, "int32"),
|
|
952
952
|
validOutputs: Fn(y, "int32")
|
|
@@ -974,7 +974,7 @@ function ss(r, t, n = !1, e = !1) {
|
|
|
974
974
|
p(s.rank === 3 || s.rank === 4, () => `Error in resizeBilinear: x must be rank 3 or 4, but got rank ${s.rank}.`), p(t.length === 2, () => `Error in resizeBilinear: new shape must 2D, but got shape ${t}.`), p(e === !1 || n === !1, () => "Error in resizeBilinear: If halfPixelCenters is true, alignCorners must be false.");
|
|
975
975
|
let a = s, o = !1;
|
|
976
976
|
s.rank === 3 && (o = !0, a = _(s, [1, s.shape[0], s.shape[1], s.shape[2]]));
|
|
977
|
-
const i = { images: a }, u = { alignCorners: n, halfPixelCenters: e, size: t }, c = f.runKernel(
|
|
977
|
+
const i = { images: a }, u = { alignCorners: n, halfPixelCenters: e, size: t }, c = f.runKernel(On, i, u);
|
|
978
978
|
return o ? _(c, [c.shape[1], c.shape[2], c.shape[3]]) : c;
|
|
979
979
|
}
|
|
980
980
|
const ts = /* @__PURE__ */ h({ resizeBilinear_: ss });
|
|
@@ -999,7 +999,7 @@ function rs(r, t, n = !1, e = !1) {
|
|
|
999
999
|
p(s.rank === 3 || s.rank === 4, () => `Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank ${s.rank}.`), p(t.length === 2, () => `Error in resizeNearestNeighbor: new shape must 2D, but got shape ${t}.`), p(s.dtype === "float32" || s.dtype === "int32", () => "`images` must have `int32` or `float32` as dtype"), p(e === !1 || n === !1, () => "Error in resizeNearestNeighbor: If halfPixelCenters is true, alignCorners must be false.");
|
|
1000
1000
|
let a = s, o = !1;
|
|
1001
1001
|
s.rank === 3 && (o = !0, a = _(s, [1, s.shape[0], s.shape[1], s.shape[2]]));
|
|
1002
|
-
const i = { images: a }, u = { alignCorners: n, halfPixelCenters: e, size: t }, c = f.runKernel(
|
|
1002
|
+
const i = { images: a }, u = { alignCorners: n, halfPixelCenters: e, size: t }, c = f.runKernel(Wn, i, u);
|
|
1003
1003
|
return o ? _(c, [c.shape[1], c.shape[2], c.shape[3]]) : c;
|
|
1004
1004
|
}
|
|
1005
1005
|
const as = /* @__PURE__ */ h({ resizeNearestNeighbor_: rs });
|
|
@@ -1021,32 +1021,32 @@ const as = /* @__PURE__ */ h({ resizeNearestNeighbor_: rs });
|
|
|
1021
1021
|
*/
|
|
1022
1022
|
function os(r, t = "binary", n = !1, e = 0.5) {
|
|
1023
1023
|
const s = l(r, "image", "threshold"), a = 0.2989, o = 0.587, i = 0.114, u = s.shape[0] * s.shape[1];
|
|
1024
|
-
let c = k(N([e]), 255),
|
|
1024
|
+
let c = k(N([e]), 255), b, m, $, g;
|
|
1025
1025
|
if (p(s.rank === 3, () => `Error in threshold: image must be rank 3,but got rank ${s.rank}.`), p(s.shape[2] === 3 || s.shape[2] === 1, () => `Error in threshold: image color channel must be equal to 3 or 1but got ${s.shape[2]}.`), p(s.dtype === "int32" || s.dtype === "float32", () => `Error in dtype: image dtype must be int32 or float32,but got dtype ${s.dtype}.`), p(t === "otsu" || t === "binary", () => `Method must be binary or otsu, but was ${t}`), s.shape[2] === 3) {
|
|
1026
|
-
[
|
|
1027
|
-
const
|
|
1028
|
-
g = Z(Z(
|
|
1026
|
+
[b, m, $] = un(s, [1, 1, 1], -1);
|
|
1027
|
+
const d = k(b, a), E = k(m, o), I = k($, i);
|
|
1028
|
+
g = Z(Z(d, E), I);
|
|
1029
1029
|
} else
|
|
1030
1030
|
g = r;
|
|
1031
1031
|
if (t === "otsu") {
|
|
1032
|
-
const
|
|
1033
|
-
c = is(
|
|
1032
|
+
const d = Un(V(ke(g), "int32"), Ln([]), 256);
|
|
1033
|
+
c = is(d, u);
|
|
1034
1034
|
}
|
|
1035
1035
|
const x = n ? pn(g, c) : U(g, c);
|
|
1036
|
-
return
|
|
1036
|
+
return V(k(x, 255), "int32");
|
|
1037
1037
|
}
|
|
1038
1038
|
function is(r, t) {
|
|
1039
|
-
let n = N([-1]), e = N([0]), s = N([0]), a, o, i, u, c,
|
|
1039
|
+
let n = N([-1]), e = N([0]), s = N([0]), a, o, i, u, c, b;
|
|
1040
1040
|
for (let m = 0; m < r.size - 1; m++) {
|
|
1041
|
-
a = M(r, 0, m + 1), o = M(r, m + 1), c =
|
|
1042
|
-
const $ = q(k(a,
|
|
1043
|
-
i =
|
|
1044
|
-
const g = Yn(o.shape, a.size), x = Z(
|
|
1045
|
-
u =
|
|
1046
|
-
const
|
|
1047
|
-
s = k(k(I,
|
|
1041
|
+
a = M(r, 0, m + 1), o = M(r, m + 1), c = R(q(a), t), b = R(q(o), t);
|
|
1042
|
+
const $ = q(k(a, W(0, a.size)));
|
|
1043
|
+
i = R($, q(a));
|
|
1044
|
+
const g = Yn(o.shape, a.size), x = Z(W(0, o.size), g), y = k(o, x);
|
|
1045
|
+
u = R(q(y), q(o));
|
|
1046
|
+
const d = S(i, u), E = S(i, u), I = k(c, b);
|
|
1047
|
+
s = k(k(I, d), E);
|
|
1048
1048
|
const A = U(s, e);
|
|
1049
|
-
e =
|
|
1049
|
+
e = G(A, s, e), n = G(A, N([m]), n);
|
|
1050
1050
|
}
|
|
1051
1051
|
return n;
|
|
1052
1052
|
}
|
|
@@ -1095,9 +1095,9 @@ function ps(r, t, n) {
|
|
|
1095
1095
|
p(e.rank >= 2, () => `bandPart(): Rank must be at least 2, got ${e.rank}.`);
|
|
1096
1096
|
const s = e.shape, [a, o] = e.shape.slice(-2);
|
|
1097
1097
|
let i, u;
|
|
1098
|
-
typeof t == "number" ? (p(t % 1 === 0, () => `bandPart(): numLower must be an integer, got ${t}.`), p(t <= a, () => `bandPart(): numLower (${t}) must not be greater than the number of rows (${a}).`), i = l(t < 0 ? a : t, "numLower", "bandPart")) : (p(t.dtype === "int32", () => "bandPart(): numLower's dtype must be an int32."), i =
|
|
1099
|
-
const c = _(
|
|
1100
|
-
return _(Y(mn(_(e, [-1, a, o])).map((x) =>
|
|
1098
|
+
typeof t == "number" ? (p(t % 1 === 0, () => `bandPart(): numLower must be an integer, got ${t}.`), p(t <= a, () => `bandPart(): numLower (${t}) must not be greater than the number of rows (${a}).`), i = l(t < 0 ? a : t, "numLower", "bandPart")) : (p(t.dtype === "int32", () => "bandPart(): numLower's dtype must be an int32."), i = G(tn(t, 0), a, rn(t, a))), typeof n == "number" ? (p(n % 1 === 0, () => `bandPart(): numUpper must be an integer, got ${n}.`), p(n <= o, () => `bandPart(): numUpper (${n}) must not be greater than the number of columns (${o}).`), u = l(n < 0 ? o : n, "numUpper", "bandPart")) : (p(n.dtype === "int32", () => "bandPart(): numUpper's dtype must be an int32."), u = G(tn(n, 0), o, rn(n, o)));
|
|
1099
|
+
const c = _(W(0, a, 1, "int32"), [-1, 1]), b = W(0, o, 1, "int32"), m = S(c, b), $ = be(pn(m, i), ce(m, nn(u))), g = Qn([a, o], e.dtype);
|
|
1100
|
+
return _(Y(mn(_(e, [-1, a, o])).map((x) => G($, x, g))), s);
|
|
1101
1101
|
}
|
|
1102
1102
|
const ms = /* @__PURE__ */ h({ bandPart_: ps });
|
|
1103
1103
|
/**
|
|
@@ -1135,7 +1135,7 @@ function hs(r) {
|
|
|
1135
1135
|
const i = k(q(k(n[o], a)), n[o]);
|
|
1136
1136
|
a = S(a, i);
|
|
1137
1137
|
}
|
|
1138
|
-
return
|
|
1138
|
+
return R(a, ln(a, "euclidean"));
|
|
1139
1139
|
}));
|
|
1140
1140
|
return t ? Y(n, 0) : n;
|
|
1141
1141
|
}
|
|
@@ -1156,7 +1156,7 @@ const fs = /* @__PURE__ */ h({ gramSchmidt_: hs });
|
|
|
1156
1156
|
* limitations under the License.
|
|
1157
1157
|
* =============================================================================
|
|
1158
1158
|
*/
|
|
1159
|
-
function
|
|
1159
|
+
function bs(r, t = !1) {
|
|
1160
1160
|
if (p(r.rank >= 2, () => `qr() requires input tensor to have a rank >= 2, but got rank ${r.rank}`), r.rank === 2)
|
|
1161
1161
|
return cn(r, t);
|
|
1162
1162
|
{
|
|
@@ -1166,8 +1166,8 @@ function ds(r, t = !1) {
|
|
|
1166
1166
|
r.shape[r.shape.length - 1]
|
|
1167
1167
|
]), 0), s = [], a = [];
|
|
1168
1168
|
e.forEach((u) => {
|
|
1169
|
-
const [c,
|
|
1170
|
-
s.push(c), a.push(
|
|
1169
|
+
const [c, b] = cn(u, t);
|
|
1170
|
+
s.push(c), a.push(b);
|
|
1171
1171
|
});
|
|
1172
1172
|
const o = _(Y(s, 0), r.shape), i = _(Y(a, 0), r.shape);
|
|
1173
1173
|
return [o, i];
|
|
@@ -1182,18 +1182,18 @@ function cn(r, t = !1) {
|
|
|
1182
1182
|
let i = L(o);
|
|
1183
1183
|
const u = n >= e ? e : n;
|
|
1184
1184
|
for (let c = 0; c < u; ++c) {
|
|
1185
|
-
const
|
|
1185
|
+
const b = a, m = i, $ = s;
|
|
1186
1186
|
[i, a, s] = f.tidy(() => {
|
|
1187
|
-
const g = M(a, [c, c], [n - c, 1]), x = ln(g), y = M(a, [c, c], [1, 1]),
|
|
1187
|
+
const g = M(a, [c, c], [n - c, 1]), x = ln(g), y = M(a, [c, c], [1, 1]), d = G(U(y, 0), H([[-1]]), H([[1]])), E = S(y, k(d, x)), I = R(g, E);
|
|
1188
1188
|
I.shape[0] === 1 ? i = L(o) : i = Q([
|
|
1189
1189
|
o,
|
|
1190
1190
|
M(I, [1, 0], [I.shape[0] - 1, I.shape[1]])
|
|
1191
1191
|
], 0);
|
|
1192
|
-
const A = nn(
|
|
1192
|
+
const A = nn(R(T(d, E), x)), z = M(a, [c, 0], [n - c, e]), B = k(A, i), P = an(i);
|
|
1193
1193
|
if (c === 0)
|
|
1194
|
-
a = S(z, T(B, T(
|
|
1194
|
+
a = S(z, T(B, T(P, z)));
|
|
1195
1195
|
else {
|
|
1196
|
-
const C = S(z, T(B, T(
|
|
1196
|
+
const C = S(z, T(B, T(P, z)));
|
|
1197
1197
|
a = Q([M(a, [0, 0], [c, e]), C], 0);
|
|
1198
1198
|
}
|
|
1199
1199
|
const sn = an(B), F = M(s, [0, c], [n, s.shape[1] - c]);
|
|
@@ -1204,12 +1204,12 @@ function cn(r, t = !1) {
|
|
|
1204
1204
|
s = Q([M(s, [0, 0], [n, c]), C], 1);
|
|
1205
1205
|
}
|
|
1206
1206
|
return [i, a, s];
|
|
1207
|
-
}), Jn([
|
|
1207
|
+
}), Jn([b, m, $]);
|
|
1208
1208
|
}
|
|
1209
1209
|
return !t && n > e && (s = M(s, [0, 0], [n, e]), a = M(a, [0, 0], [e, e])), [s, a];
|
|
1210
1210
|
});
|
|
1211
1211
|
}
|
|
1212
|
-
const
|
|
1212
|
+
const ds = /* @__PURE__ */ h({ qr_: bs });
|
|
1213
1213
|
/**
|
|
1214
1214
|
* @license
|
|
1215
1215
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
@@ -1234,7 +1234,7 @@ const ws = {
|
|
|
1234
1234
|
rgbToGrayscale: Be,
|
|
1235
1235
|
rotateWithOffset: Ke,
|
|
1236
1236
|
cropAndResize: Ne,
|
|
1237
|
-
nonMaxSuppression:
|
|
1237
|
+
nonMaxSuppression: Ge,
|
|
1238
1238
|
nonMaxSuppressionAsync: Je,
|
|
1239
1239
|
nonMaxSuppressionWithScore: Xe,
|
|
1240
1240
|
nonMaxSuppressionWithScoreAsync: He,
|
|
@@ -1245,25 +1245,33 @@ const ws = {
|
|
|
1245
1245
|
}, zs = {
|
|
1246
1246
|
bandPart: ms,
|
|
1247
1247
|
gramSchmidt: fs,
|
|
1248
|
-
qr:
|
|
1248
|
+
qr: ds
|
|
1249
1249
|
};
|
|
1250
1250
|
export {
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1251
|
+
be as a,
|
|
1252
|
+
pn as b,
|
|
1253
|
+
an as c,
|
|
1254
|
+
O as d,
|
|
1255
|
+
U as e,
|
|
1256
|
+
tn as f,
|
|
1257
1257
|
ce as g,
|
|
1258
|
-
|
|
1259
|
-
|
|
1258
|
+
K as h,
|
|
1259
|
+
ae as i,
|
|
1260
1260
|
Ie as j,
|
|
1261
1261
|
ws as k,
|
|
1262
1262
|
zs as l,
|
|
1263
1263
|
rn as m,
|
|
1264
1264
|
nn as n,
|
|
1265
|
+
le as o,
|
|
1266
|
+
ts as p,
|
|
1267
|
+
as as q,
|
|
1268
|
+
$e as r,
|
|
1265
1269
|
M as s,
|
|
1266
1270
|
N as t,
|
|
1267
1271
|
mn as u,
|
|
1268
|
-
|
|
1272
|
+
ke as v,
|
|
1273
|
+
G as w,
|
|
1274
|
+
je as x,
|
|
1275
|
+
Fe as y,
|
|
1276
|
+
Oe as z
|
|
1269
1277
|
};
|