@genai-fi/nanogpt 0.10.3 → 0.12.0
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.d.ts +10 -5
- package/dist/Generator.js +1789 -1765
- package/dist/{RealDiv-KAPDe8zB.js → RealDiv-C8neBwFi.js} +15 -15
- package/dist/{Reshape-BYkmUnAv.js → Reshape-Bd4V_4X7.js} +1 -1
- package/dist/{Reshape-Zt6eb7yh.js → Reshape-Ck29jQSY.js} +5 -5
- package/dist/TeachableLLM.d.ts +5 -3
- package/dist/TeachableLLM.js +14 -14
- package/dist/Trainer.d.ts +3 -1
- package/dist/Trainer.js +11 -8
- package/dist/{axis_util-BaG7mf5A.js → axis_util-DGqbT-FX.js} +3 -3
- package/dist/backend.js +2 -2
- package/dist/{backend_util-RCe-rHaj.js → backend_util-DC3rBo_H.js} +18 -18
- package/dist/{backend_webgpu-DE3ACOLx.js → backend_webgpu-mbhNnlx9.js} +3 -3
- package/dist/{broadcast_to-B3eYlZm7.js → broadcast_to-D1Dmg2Oz.js} +2 -2
- package/dist/checks/appendCache.js +2 -2
- package/dist/checks/attentionMask.js +3 -3
- package/dist/checks/gelu.js +2 -2
- package/dist/checks/matMulGelu.js +2 -2
- package/dist/checks/normRMS.js +4 -4
- package/dist/checks/normRMSGrad.js +3 -3
- package/dist/checks/packUnpack.js +2 -2
- package/dist/checks/qkv.js +4 -4
- package/dist/checks/rope.js +2 -2
- package/dist/{clip_by_value-BnO7-a88.js → clip_by_value-fg2aKzUy.js} +5 -5
- package/dist/complex-Cyg-eQeZ.js +11 -0
- package/dist/concat-CSm2rMwe.js +17 -0
- package/dist/{concat_util-DpW8mL_l.js → concat_util-D0je5Ppu.js} +1 -1
- package/dist/{dataset-BcwmTGYc.js → dataset-CVIJu7Xa.js} +7 -7
- package/dist/{dropout-BcvN9JYi.js → dropout-DLhSMNTZ.js} +9 -9
- package/dist/expand_dims-ChkuOp6I.js +11 -0
- package/dist/{exports_initializers-Hta_rEnm.js → exports_initializers-1KWPiStI.js} +1 -1
- package/dist/{floor-D5QdR_le.js → floor-BRMPgeIs.js} +1 -1
- package/dist/{gather-D3JcZUaI.js → gather-BSULDalH.js} +1 -1
- package/dist/{gelu-CjNPL4OH.js → gelu-BK1k-n1i.js} +1 -1
- package/dist/{gpgpu_math-DAOmgtXR.js → gpgpu_math-BJSTk_mW.js} +25 -25
- package/dist/{index-BwexR4lA.js → index-BBVLAXZD.js} +89 -89
- package/dist/{index-DOvlwCh-.js → index-Duu1Lvvv.js} +53 -53
- package/dist/{kernel_funcs_utils-CCzYdUZg.js → kernel_funcs_utils-BtYrPoJu.js} +6 -6
- package/dist/layers/BaseLayer.js +2 -2
- package/dist/layers/CausalSelfAttention.js +6 -6
- package/dist/layers/MLP.js +4 -4
- package/dist/layers/PositionEmbedding.js +5 -5
- package/dist/layers/RMSNorm.js +3 -3
- package/dist/layers/RoPECache.js +4 -4
- package/dist/layers/TiedEmbedding.js +6 -6
- package/dist/layers/TransformerBlock.js +1 -1
- package/dist/loader/loadTransformers.js +1 -1
- package/dist/loader/oldZipLoad.js +9 -9
- package/dist/log_sum_exp-CVqLsVLl.js +39 -0
- package/dist/main.d.ts +10 -1
- package/dist/main.js +68 -58
- package/dist/{matMul16-BWRSOCWB.js → matMul16-xswmhSuF.js} +3 -3
- package/dist/{matMulGelu-CzfgT6Wq.js → matMulGelu-BpvgnYG8.js} +14 -14
- package/dist/mat_mul-Bn2BDpT4.js +11 -0
- package/dist/{mod-AnXEvvpo.js → mod-B4AUd1Np.js} +1 -1
- package/dist/models/NanoGPTV1.js +2 -2
- package/dist/models/model.js +9 -9
- package/dist/{ones-D2rT0xk2.js → ones-CBI1AQjb.js} +3 -3
- package/dist/ops/adamAdjust.js +1 -1
- package/dist/ops/adamMoments.js +1 -1
- package/dist/ops/add16.js +1 -1
- package/dist/ops/appendCache.js +3 -3
- package/dist/ops/attentionMask.js +1 -1
- package/dist/ops/concat16.js +2 -2
- package/dist/ops/cpu/adamAdjust.js +9 -9
- package/dist/ops/cpu/adamMoments.js +5 -5
- package/dist/ops/cpu/appendCache.js +6 -6
- package/dist/ops/cpu/attentionMask.js +10 -10
- package/dist/ops/cpu/fusedSoftmax.js +5 -5
- package/dist/ops/cpu/gatherSub.js +9 -9
- package/dist/ops/cpu/gelu.js +5 -5
- package/dist/ops/cpu/matMul16.js +2 -2
- package/dist/ops/cpu/matMulGelu.js +3 -3
- package/dist/ops/cpu/matMulMul.js +5 -5
- package/dist/ops/cpu/mulDropout.js +1 -1
- package/dist/ops/cpu/normRMS.js +7 -7
- package/dist/ops/cpu/qkv.js +3 -3
- package/dist/ops/cpu/rope.js +5 -5
- package/dist/ops/cpu/scatterSub.js +11 -11
- package/dist/ops/dot16.js +2 -2
- package/dist/ops/gatherSub.js +1 -1
- package/dist/ops/gelu.js +2 -2
- package/dist/ops/grads/add16.js +4 -4
- package/dist/ops/grads/attentionMask.js +2 -2
- package/dist/ops/grads/gelu.js +2 -2
- package/dist/ops/grads/matMul16.js +3 -3
- package/dist/ops/grads/matMulGelu.js +6 -6
- package/dist/ops/grads/normRMS.js +4 -4
- package/dist/ops/grads/pack16.js +3 -3
- package/dist/ops/grads/qkv.js +10 -10
- package/dist/ops/grads/rope.js +2 -2
- package/dist/ops/grads/softmax16.js +1 -1
- package/dist/ops/grads/unpack16.js +2 -2
- package/dist/ops/matMul16.js +3 -3
- package/dist/ops/matMulGelu.js +2 -2
- package/dist/ops/matMulMul.js +1 -1
- package/dist/ops/mul16.js +1 -1
- package/dist/ops/mulDrop.js +1 -1
- package/dist/ops/normRMS.js +1 -1
- package/dist/ops/pack16.js +2 -2
- package/dist/ops/qkv.js +1 -1
- package/dist/ops/reshape16.js +2 -2
- package/dist/ops/rope.js +2 -2
- package/dist/ops/scatterSub.js +1 -1
- package/dist/ops/slice16.js +2 -2
- package/dist/ops/softmax16.js +1 -1
- package/dist/ops/sub16.js +1 -1
- package/dist/ops/sum16.js +2 -2
- package/dist/ops/transpose16.js +6 -6
- package/dist/ops/unpack16.js +2 -2
- package/dist/ops/webgl/adamAdjust.js +2 -2
- package/dist/ops/webgl/adamMoments.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 +4 -4
- 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/matMul16.js +8 -8
- package/dist/ops/webgl/matMulGelu.js +4 -4
- package/dist/ops/webgl/matMulMul.js +7 -7
- package/dist/ops/webgl/mulDropout.js +1 -1
- package/dist/ops/webgl/normRMS.js +7 -7
- 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/webgpu/adamAdjust.js +3 -3
- package/dist/ops/webgpu/adamMoments.js +5 -5
- package/dist/ops/webgpu/add16.js +1 -1
- package/dist/ops/webgpu/appendCache.js +3 -3
- package/dist/ops/webgpu/attentionMask.js +2 -2
- package/dist/ops/webgpu/attentionMask32_program.js +2 -2
- package/dist/ops/webgpu/concat16.js +5 -5
- package/dist/ops/webgpu/gatherSub.js +5 -5
- package/dist/ops/webgpu/gelu.js +3 -3
- package/dist/ops/webgpu/matMul16.js +19 -19
- package/dist/ops/webgpu/matMul16_program.js +2 -2
- package/dist/ops/webgpu/mul16.js +4 -4
- package/dist/ops/webgpu/normRMS.js +6 -6
- package/dist/ops/webgpu/normRMSGrad.js +4 -4
- package/dist/ops/webgpu/pack16.js +3 -3
- package/dist/ops/webgpu/pack16_program.js +2 -2
- package/dist/ops/webgpu/qkv.js +8 -8
- package/dist/ops/webgpu/rope.js +3 -3
- package/dist/ops/webgpu/scatterSub.js +3 -3
- package/dist/ops/webgpu/slice16.js +4 -4
- package/dist/ops/webgpu/softmax16.js +4 -4
- package/dist/ops/webgpu/softmax16_program.js +2 -2
- package/dist/ops/webgpu/softmax16_subgroup_program.js +2 -2
- package/dist/ops/webgpu/softmax16grad.js +1 -1
- package/dist/ops/webgpu/sub16.js +4 -4
- package/dist/ops/webgpu/sum16.js +5 -5
- package/dist/ops/webgpu/transpose16.js +2 -2
- package/dist/ops/webgpu/transpose16_program.js +2 -2
- package/dist/ops/webgpu/transpose16_shared_program.js +3 -3
- package/dist/ops/webgpu/unpack16.js +5 -5
- package/dist/ops/webgpu/utils/binary_op.js +3 -3
- package/dist/ops/webgpu/utils/reductions.js +4 -4
- package/dist/{ops-B5yanEdW.js → ops-C2_OXuZ4.js} +69 -69
- package/dist/{pack16-nQ6JaLo-.js → pack16-atD0eYRm.js} +9 -9
- package/dist/patches/webgpu_backend.js +6 -6
- package/dist/patches/webgpu_base.js +1 -1
- package/dist/patches/webgpu_program.js +8 -8
- package/dist/{random_width-or-CEftb.js → random_width-BN4wGJaW.js} +33 -33
- package/dist/range-DKmP1-OQ.js +10 -0
- package/dist/relu-BsXmGzzu.js +9 -0
- package/dist/{reshape-ByE68wS9.js → reshape-BI0yzp1T.js} +1 -1
- package/dist/{resize_nearest_neighbor-B19mCEg2.js → resize_nearest_neighbor-BA_BX-ub.js} +26 -26
- package/dist/{rope-Ir4mTyD1.js → rope-DJ7Y7c-u.js} +1 -1
- package/dist/{scatter_nd_util-lvSiX8q4.js → scatter_nd_util-k9MUVUkn.js} +1 -1
- package/dist/{selu_util-kbhpTdYD.js → selu_util-DyW0X1WG.js} +5 -5
- package/dist/{shared-DT1TkE6w.js → shared-Q3BS6T03.js} +1 -1
- package/dist/{shared-dntlHIDQ.js → shared-nnSWpC3u.js} +86 -86
- package/dist/{slice-BfEGSH82.js → slice-wBNvzVyz.js} +1 -1
- package/dist/{slice_util-uTKwiEpW.js → slice_util-zN8KFC5I.js} +1 -1
- package/dist/{softmax-CA5jFsLR.js → softmax-DfuYyjMh.js} +1 -1
- package/dist/split-BYrLboMq.js +9 -0
- package/dist/squeeze-Bk8Brcct.js +10 -0
- package/dist/{stack-Cf4n9h0N.js → stack-CDWShFHF.js} +1 -1
- package/dist/{step-CINUs5QB.js → step-BS5JXRR6.js} +23 -23
- package/dist/{sum-DWAtNGez.js → sum-BPUfDB2X.js} +3 -3
- package/dist/tensor-CEt9Nm2s.js +8 -0
- package/dist/tensor1d-Cc_KCIDg.js +11 -0
- package/dist/{tensor2d-Bs9wZRc7.js → tensor2d-BN97fF71.js} +3 -3
- package/dist/{tensor4d-BARPdTaS.js → tensor4d-vuDDgdUI.js} +1 -1
- package/dist/{tfjs_backend-y1cvNhLA.js → tfjs_backend-806hyYve.js} +49 -49
- package/dist/{tile-mbfagpsB.js → tile-OWUvpIVt.js} +3 -3
- package/dist/tokeniser/BaseTokeniser.d.ts +25 -0
- package/dist/tokeniser/BaseTokeniser.js +94 -0
- package/dist/tokeniser/CharTokeniser.d.ts +10 -9
- package/dist/tokeniser/CharTokeniser.js +44 -30
- package/dist/tokeniser/bpe.d.ts +10 -9
- package/dist/tokeniser/bpe.js +67 -52
- package/dist/tokeniser/type.d.ts +14 -5
- package/dist/training/Adam.js +2 -2
- package/dist/training/AdamExt.js +1 -1
- package/dist/training/DatasetBuilder.d.ts +3 -3
- package/dist/training/DatasetBuilder.js +34 -38
- package/dist/training/FullTrainer.js +1 -1
- package/dist/training/Trainer.d.ts +4 -3
- package/dist/training/Trainer.js +22 -25
- package/dist/training/sparseCrossEntropy.js +3 -3
- package/dist/training/tasks/ConversationTask.d.ts +11 -0
- package/dist/training/tasks/ConversationTask.js +26 -0
- package/dist/training/tasks/PretrainingTask.d.ts +11 -0
- package/dist/training/tasks/PretrainingTask.js +34 -0
- package/dist/training/tasks/StartSentenceTask.d.ts +12 -0
- package/dist/training/tasks/StartSentenceTask.js +42 -0
- package/dist/training/tasks/Task.d.ts +8 -0
- package/dist/training/tasks/Task.js +41 -0
- package/dist/{transpose-ClWiBS_b.js → transpose-BUkQCJp9.js} +6 -6
- package/dist/{unsorted_segment_sum-BDDhB_E6.js → unsorted_segment_sum-BljxHhCY.js} +5 -5
- package/dist/utilities/dummy.js +3 -3
- package/dist/utilities/multinomialCPU.js +2 -2
- package/dist/utilities/packed.js +1 -1
- package/dist/utilities/performance.js +1 -1
- package/dist/utilities/profile.js +1 -1
- package/dist/utilities/safetensors.js +2 -2
- package/dist/utilities/sentences.d.ts +1 -1
- package/dist/utilities/sentences.js +11 -11
- package/dist/utilities/weights.js +2 -2
- package/dist/{variable-WawDEaAb.js → variable-DPt_Iuog.js} +1 -1
- package/dist/{webgpu_program-DuOXPQol.js → webgpu_program-BpWRlghH.js} +3 -3
- package/dist/{webgpu_util-RxEF33Rj.js → webgpu_util-DMiKzzQM.js} +7 -7
- package/dist/{zeros-KnWaWf-X.js → zeros-5YROwwUH.js} +2 -2
- package/dist/{zeros_like-DvE73F4e.js → zeros_like-De4n1C3m.js} +71 -71
- package/package.json +1 -1
- package/dist/complex-DjxcVmoX.js +0 -11
- package/dist/concat-BV8bt5H-.js +0 -17
- package/dist/expand_dims-DT4tEPwA.js +0 -11
- package/dist/log_sum_exp-ngO0-4pK.js +0 -39
- package/dist/mat_mul-SjpJRLyL.js +0 -11
- package/dist/range-BklejeeW.js +0 -10
- package/dist/relu-CP0ZcxWO.js +0 -9
- package/dist/split-CVLc0w--.js +0 -9
- package/dist/squeeze-C7Z2srUo.js +0 -10
- package/dist/tensor-DJoc7gJU.js +0 -8
- package/dist/tensor1d-D11P_7Dp.js +0 -11
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { e as
|
|
3
|
-
import { r as l } from "./reshape-
|
|
4
|
-
import { b as uo } from "./broadcast_to-
|
|
5
|
-
import { c as co } from "./clip_by_value-
|
|
6
|
-
import { c as _ } from "./concat-
|
|
7
|
-
import { w as J, n as L, b as S, c as fo, g as lo, l as mo, a as Do, f as yo, d as Io, j as wo, m as xo, e as go, i as $o, h as bo, r as ko, s as vo, u as No } from "./resize_nearest_neighbor-
|
|
8
|
-
import { m as v } from "./mat_mul-
|
|
9
|
-
import { s as Q, k as _o, h as To, e as Eo, l as So, p as qo, r as
|
|
10
|
-
import { e as Po, l as Co, a as
|
|
11
|
-
import { e as
|
|
12
|
-
import { f as Bo } from "./floor-
|
|
13
|
-
import { g as Ho } from "./gather-
|
|
14
|
-
import { c as q } from "./complex-
|
|
15
|
-
import { n as N, r as
|
|
16
|
-
import { s as T } from "./slice-
|
|
17
|
-
import { m as
|
|
18
|
-
import { r as
|
|
19
|
-
import { s as
|
|
20
|
-
import { z as Ro } from "./zeros-
|
|
21
|
-
import { s as
|
|
22
|
-
import { s as
|
|
23
|
-
import { s as Vo } from "./stack-
|
|
24
|
-
import { s as Zo } from "./sum-
|
|
25
|
-
import { t as Uo } from "./tile-
|
|
1
|
+
import { o as u, q as h, E as d, c9 as st, ca as rt, cb as nt, cc as et, cd as it, ce as pt, B, cf as at, cg as ht, b_ as ut, x as D, ch as ct, ci as ft, j as H, a2 as C, b$ as lt, cj as dt, ck as mt, cl as Dt, aG as yt, cm as It, a1 as wt, m as M, _ as F, cn as xt, co as gt, L as $, c3 as $t, cp as bt, cq as kt, cr as vt, cs as Nt, b as _t, ct as Tt, cu as Et, cv as St, cw as qt, cx as r, aZ as Kt, l as zt, a3 as j, cy as Pt, cz as Ct, p as Mt, n as Ot, b0 as At, c as Bt } from "./index-Duu1Lvvv.js";
|
|
2
|
+
import { e as W, a as R, l as G, b as X, d as V, m as Z, f as U, r as E, g as Ht, h as Ft, i as jt, j as Wt, k as Rt, n as Gt, o as Xt, c as Vt, p as Zt, q as Ut, t as Jt, u as Lt, v as Qt, w as Yt, x as to, y as oo, z as so, A as ro, B as no, C as eo, s as io, D as po, E as ao, F as ho } from "./unsorted_segment_sum-BljxHhCY.js";
|
|
3
|
+
import { r as l } from "./reshape-BI0yzp1T.js";
|
|
4
|
+
import { b as uo } from "./broadcast_to-D1Dmg2Oz.js";
|
|
5
|
+
import { c as co } from "./clip_by_value-fg2aKzUy.js";
|
|
6
|
+
import { c as _ } from "./concat-CSm2rMwe.js";
|
|
7
|
+
import { w as J, n as L, b as S, c as fo, g as lo, l as mo, a as Do, f as yo, d as Io, j as wo, m as xo, e as go, i as $o, h as bo, r as ko, s as vo, u as No } from "./resize_nearest_neighbor-BA_BX-ub.js";
|
|
8
|
+
import { m as v } from "./mat_mul-Bn2BDpT4.js";
|
|
9
|
+
import { s as Q, k as _o, h as To, e as Eo, l as So, p as qo, r as Ko, a as zo } from "./step-BS5JXRR6.js";
|
|
10
|
+
import { e as Po, l as Co, a as Mo, m as Oo } from "./log_sum_exp-CVqLsVLl.js";
|
|
11
|
+
import { e as Ao } from "./expand_dims-ChkuOp6I.js";
|
|
12
|
+
import { f as Bo } from "./floor-BRMPgeIs.js";
|
|
13
|
+
import { g as Ho } from "./gather-BSULDalH.js";
|
|
14
|
+
import { c as q } from "./complex-Cyg-eQeZ.js";
|
|
15
|
+
import { n as N, r as K, i as Y, t as Fo } from "./transpose-BUkQCJp9.js";
|
|
16
|
+
import { s as T } from "./slice-wBNvzVyz.js";
|
|
17
|
+
import { m as jo } from "./mod-B4AUd1Np.js";
|
|
18
|
+
import { r as Wo } from "./relu-BsXmGzzu.js";
|
|
19
|
+
import { s as z } from "./split-BYrLboMq.js";
|
|
20
|
+
import { z as Ro } from "./zeros-5YROwwUH.js";
|
|
21
|
+
import { s as Go } from "./softmax-DfuYyjMh.js";
|
|
22
|
+
import { s as Xo } from "./squeeze-Bk8Brcct.js";
|
|
23
|
+
import { s as Vo } from "./stack-CDWShFHF.js";
|
|
24
|
+
import { s as Zo } from "./sum-BPUfDB2X.js";
|
|
25
|
+
import { t as Uo } from "./tile-OWUvpIVt.js";
|
|
26
26
|
function Jo(t) {
|
|
27
27
|
const s = { x: h(t, "x", "acos") };
|
|
28
28
|
return d.runKernel(st, s);
|
|
@@ -93,7 +93,7 @@ const ys = /* @__PURE__ */ u({ dilation2d_: Ds });
|
|
|
93
93
|
function Is(t, o) {
|
|
94
94
|
let s = h(t, "a", "div"), n = h(o, "b", "div");
|
|
95
95
|
[s, n] = B(s, n);
|
|
96
|
-
const e = H(s, n), i = C(e), p =
|
|
96
|
+
const e = H(s, n), i = C(e), p = W(n, i);
|
|
97
97
|
return J(p, i, e);
|
|
98
98
|
}
|
|
99
99
|
const ws = /* @__PURE__ */ u({ divNoNan_: Is });
|
|
@@ -140,7 +140,7 @@ function Ss(t) {
|
|
|
140
140
|
return d.runKernel(Dt, s);
|
|
141
141
|
}
|
|
142
142
|
const qs = /* @__PURE__ */ u({ isNaN_: Ss });
|
|
143
|
-
function
|
|
143
|
+
function Ks(t, o = 5, s = 1, n = 1, e = 0.5) {
|
|
144
144
|
const i = h(t, "x", "localResponseNormalization");
|
|
145
145
|
D(i.rank === 4 || i.rank === 3, () => `Error in localResponseNormalization: x must be rank 3 or 4 but got
|
|
146
146
|
rank ${i.rank}.`), D(yt(o), () => `Error in localResponseNormalization: depthRadius must be an integer but got depthRadius ${o}.`);
|
|
@@ -149,24 +149,24 @@ function zs(t, o = 5, s = 1, n = 1, e = 0.5) {
|
|
|
149
149
|
const f = { x: p }, y = { depthRadius: o, bias: s, alpha: n, beta: e }, c = d.runKernel(It, f, y);
|
|
150
150
|
return a ? l(c, [c.shape[1], c.shape[2], c.shape[3]]) : c;
|
|
151
151
|
}
|
|
152
|
-
const
|
|
152
|
+
const zs = /* @__PURE__ */ u({ localResponseNormalization_: Ks });
|
|
153
153
|
function Ps(t) {
|
|
154
154
|
const o = h(t, "x", "logSigmoid");
|
|
155
|
-
return wt((n) => ({ value: N(R(N(n))), gradFunc: (p) =>
|
|
155
|
+
return wt((n) => ({ value: N(R(N(n))), gradFunc: (p) => M(p, Q(N(n))) }))(o);
|
|
156
156
|
}
|
|
157
157
|
const Cs = /* @__PURE__ */ u({ logSigmoid_: Ps });
|
|
158
|
-
function
|
|
158
|
+
function Ms(t, o) {
|
|
159
159
|
const s = h(t, "a", "logicalOr", "bool"), n = h(o, "b", "logicalOr", "bool");
|
|
160
160
|
F(s.shape, n.shape);
|
|
161
161
|
const e = { a: s, b: n };
|
|
162
162
|
return d.runKernel(xt, e);
|
|
163
163
|
}
|
|
164
|
-
const tt = /* @__PURE__ */ u({ logicalOr_:
|
|
165
|
-
function
|
|
164
|
+
const tt = /* @__PURE__ */ u({ logicalOr_: Ms });
|
|
165
|
+
function Os(t, o) {
|
|
166
166
|
const s = h(t, "a", "logicalXor", "bool"), n = h(o, "b", "logicalXor", "bool");
|
|
167
|
-
return F(s.shape, n.shape), S(tt(t, o),
|
|
167
|
+
return F(s.shape, n.shape), S(tt(t, o), G(S(t, o)));
|
|
168
168
|
}
|
|
169
|
-
const
|
|
169
|
+
const As = /* @__PURE__ */ u({ logicalXor_: Os });
|
|
170
170
|
function Bs(t, o, s) {
|
|
171
171
|
D(s === "reflect" || s === "symmetric", () => `Invalid mode. Mode must be either reflect or symmetric. Got ${s}.`);
|
|
172
172
|
const n = h(t, "x", "mirrorPad");
|
|
@@ -187,26 +187,26 @@ function Fs(t, o, s, n, e, i, p) {
|
|
|
187
187
|
a.rank === 3 && (y = !0, f = l(a, [1, a.shape[0], a.shape[1], a.shape[2]])), D(_o(i, e), () => `Error in pool: Either strides or dilations must be 1. Got strides ${i} and dilations '${e}'`);
|
|
188
188
|
const c = To(f.shape, o, i, e, n), m = [c.dilationHeight, c.dilationWidth];
|
|
189
189
|
let I;
|
|
190
|
-
n === "same" ? I =
|
|
191
|
-
const w = m[0] === 1 && m[1] === 1, [x, g] =
|
|
190
|
+
n === "same" ? I = Ws([c.filterHeight, c.filterWidth], m) : I = [[0, 0], [0, 0]];
|
|
191
|
+
const w = m[0] === 1 && m[1] === 1, [x, g] = js([c.inHeight, c.inWidth], m, I), b = w ? n : "valid", O = w ? f : X(f, m, x), A = (s === "avg" ? () => V(O, o, i, b, p) : () => Z(O, o, i, b, p))(), k = w ? A : U(A, m, g);
|
|
192
192
|
return y ? l(k, [k.shape[1], k.shape[2], k.shape[3]]) : k;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function js(t, o, s) {
|
|
195
195
|
const n = s.map((c) => c[0]), e = s.map((c) => c[1]), i = t.concat(n, e), p = o.map((c, m) => (c - i[m] % c) % c), a = e.map((c, m) => c + p[m]), f = o.map((c, m) => [n[m], a[m]]), y = o.map((c, m) => [0, p[m]]);
|
|
196
196
|
return [f, y];
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function Ws(t, o) {
|
|
199
199
|
const n = t.map((p, a) => p + (p - 1) * (o[a] - 1)).map((p) => p - 1), e = n.map((p) => Math.floor(p / 2)), i = n.map((p, a) => p - e[a]);
|
|
200
200
|
return n.map((p, a) => [e[a], i[a]]);
|
|
201
201
|
}
|
|
202
202
|
const Rs = /* @__PURE__ */ u({ pool_: Fs });
|
|
203
|
-
function
|
|
203
|
+
function Gs(t, o = null, s = !1) {
|
|
204
204
|
let n = h(t, "x", "prod");
|
|
205
205
|
n.dtype === "bool" && (n = $(n, "int32"));
|
|
206
206
|
const e = { x: n }, i = { axis: o, keepDims: s };
|
|
207
207
|
return d.runKernel($t, e, i);
|
|
208
208
|
}
|
|
209
|
-
const
|
|
209
|
+
const Xs = /* @__PURE__ */ u({ prod_: Gs });
|
|
210
210
|
function Vs(t) {
|
|
211
211
|
const s = { x: h(t, "x", "reciprocal") };
|
|
212
212
|
return d.runKernel(bt, s);
|
|
@@ -236,10 +236,10 @@ function Ys(t) {
|
|
|
236
236
|
const e = l(t, [s, o]);
|
|
237
237
|
n = P(e);
|
|
238
238
|
} else {
|
|
239
|
-
const e = [s, 2 * (o - 1)], i = l(
|
|
239
|
+
const e = [s, 2 * (o - 1)], i = l(K(t), [s, o]), p = l(Y(t), [s, o]), a = E(T(i, [0, 1], [s, o - 2]), 1), f = M(E(T(p, [0, 1], [s, o - 2]), 1), _t(-1)), y = _([i, a], 1), c = _([p, f], 1), m = l(q(y, c), [e[0], e[1]]);
|
|
240
240
|
n = P(m);
|
|
241
241
|
}
|
|
242
|
-
if (n =
|
|
242
|
+
if (n = K(n), t.rank === 3 && t.shape[0] !== 0) {
|
|
243
243
|
const e = n, i = t.shape[0];
|
|
244
244
|
n = l(n, [i, n.shape[0] / i, n.shape[1]]), e.dispose();
|
|
245
245
|
}
|
|
@@ -259,7 +259,7 @@ function or(t, o) {
|
|
|
259
259
|
x[t.shape.length - 1] = o - s, e = _([t, Ro(x)], t.shape.length - 1), s = o;
|
|
260
260
|
} else
|
|
261
261
|
e = t;
|
|
262
|
-
const i = C(e), p = l(q(e, i), [n, s]), a = ot(p), f = Math.floor(s / 2) + 1, y =
|
|
262
|
+
const i = C(e), p = l(q(e, i), [n, s]), a = ot(p), f = Math.floor(s / 2) + 1, y = K(a), c = Y(a), m = z(y, [f, s - f], y.shape.length - 1), I = z(c, [f, s - f], c.shape.length - 1), w = e.shape.slice();
|
|
263
263
|
return w[e.shape.length - 1] = f, l(q(m[0], I[0]), w);
|
|
264
264
|
}
|
|
265
265
|
const sr = /* @__PURE__ */ u({ rfft_: or });
|
|
@@ -303,7 +303,7 @@ function hr(t, o = 0) {
|
|
|
303
303
|
}
|
|
304
304
|
const ur = /* @__PURE__ */ u({ unique_: hr });
|
|
305
305
|
r().prototype.abs = function() {
|
|
306
|
-
return this.throwIfDisposed(),
|
|
306
|
+
return this.throwIfDisposed(), Kt(this);
|
|
307
307
|
};
|
|
308
308
|
r().prototype.acos = function() {
|
|
309
309
|
return this.throwIfDisposed(), Lo(this);
|
|
@@ -312,7 +312,7 @@ r().prototype.acosh = function() {
|
|
|
312
312
|
return this.throwIfDisposed(), Yo(this);
|
|
313
313
|
};
|
|
314
314
|
r().prototype.add = function(t) {
|
|
315
|
-
return this.throwIfDisposed(),
|
|
315
|
+
return this.throwIfDisposed(), zt(this, t);
|
|
316
316
|
};
|
|
317
317
|
r().prototype.all = function(t, o) {
|
|
318
318
|
return this.throwIfDisposed(), Ht(this, t, o);
|
|
@@ -321,7 +321,7 @@ r().prototype.any = function(t, o) {
|
|
|
321
321
|
return this.throwIfDisposed(), Ft(this, t, o);
|
|
322
322
|
};
|
|
323
323
|
r().prototype.argMax = function(t) {
|
|
324
|
-
return this.throwIfDisposed(),
|
|
324
|
+
return this.throwIfDisposed(), jt(this, t);
|
|
325
325
|
};
|
|
326
326
|
r().prototype.argMin = function(t) {
|
|
327
327
|
return this.throwIfDisposed(), os(this, t);
|
|
@@ -369,7 +369,7 @@ r().prototype.batchToSpaceND = function(t, o) {
|
|
|
369
369
|
return this.throwIfDisposed(), U(this, t, o);
|
|
370
370
|
};
|
|
371
371
|
r().prototype.batchNorm = function(t, o, s, n, e) {
|
|
372
|
-
return this.throwIfDisposed(),
|
|
372
|
+
return this.throwIfDisposed(), Wt(this, t, o, s, n, e);
|
|
373
373
|
};
|
|
374
374
|
r().prototype.broadcastTo = function(t) {
|
|
375
375
|
return this.throwIfDisposed(), uo(this, t);
|
|
@@ -384,16 +384,16 @@ r().prototype.clipByValue = function(t, o) {
|
|
|
384
384
|
return this.throwIfDisposed(), co(this, t, o);
|
|
385
385
|
};
|
|
386
386
|
r().prototype.concat = function(t, o) {
|
|
387
|
-
return this.throwIfDisposed(), t instanceof
|
|
387
|
+
return this.throwIfDisposed(), t instanceof j && (t = [t]), _([this, ...t], o);
|
|
388
388
|
};
|
|
389
389
|
r().prototype.conv1d = function(t, o, s, n, e, i) {
|
|
390
390
|
return this.throwIfDisposed(), Rt(this, t, o, s, n, e, i);
|
|
391
391
|
};
|
|
392
392
|
r().prototype.conv2dTranspose = function(t, o, s, n, e) {
|
|
393
|
-
return this.throwIfDisposed(),
|
|
393
|
+
return this.throwIfDisposed(), Gt(this, t, o, s, n, e);
|
|
394
394
|
};
|
|
395
395
|
r().prototype.conv2d = function(t, o, s, n, e, i) {
|
|
396
|
-
return this.throwIfDisposed(),
|
|
396
|
+
return this.throwIfDisposed(), Xt(this, t, o, s, n, e, i);
|
|
397
397
|
};
|
|
398
398
|
r().prototype.cos = function() {
|
|
399
399
|
return this.throwIfDisposed(), Vt(this);
|
|
@@ -429,7 +429,7 @@ r().prototype.elu = function() {
|
|
|
429
429
|
return this.throwIfDisposed(), Eo(this);
|
|
430
430
|
};
|
|
431
431
|
r().prototype.equal = function(t) {
|
|
432
|
-
return this.throwIfDisposed(),
|
|
432
|
+
return this.throwIfDisposed(), W(this, t);
|
|
433
433
|
};
|
|
434
434
|
r().prototype.erf = function() {
|
|
435
435
|
return this.throwIfDisposed(), Qt(this);
|
|
@@ -441,7 +441,7 @@ r().prototype.exp = function() {
|
|
|
441
441
|
return this.throwIfDisposed(), Po(this);
|
|
442
442
|
};
|
|
443
443
|
r().prototype.expandDims = function(t) {
|
|
444
|
-
return this.throwIfDisposed(),
|
|
444
|
+
return this.throwIfDisposed(), Ao(this, t);
|
|
445
445
|
};
|
|
446
446
|
r().prototype.expm1 = function() {
|
|
447
447
|
return this.throwIfDisposed(), vs(this);
|
|
@@ -492,7 +492,7 @@ r().prototype.less = function(t) {
|
|
|
492
492
|
return this.throwIfDisposed(), Do(this, t);
|
|
493
493
|
};
|
|
494
494
|
r().prototype.localResponseNormalization = function(t, o, s, n) {
|
|
495
|
-
return this.throwIfDisposed(),
|
|
495
|
+
return this.throwIfDisposed(), zs(this, t, o, s, n);
|
|
496
496
|
};
|
|
497
497
|
r().prototype.logSigmoid = function() {
|
|
498
498
|
return this.throwIfDisposed(), Cs(this);
|
|
@@ -504,7 +504,7 @@ r().prototype.logSumExp = function(t, o) {
|
|
|
504
504
|
return this.throwIfDisposed(), Co(this, t, o);
|
|
505
505
|
};
|
|
506
506
|
r().prototype.log = function() {
|
|
507
|
-
return this.throwIfDisposed(),
|
|
507
|
+
return this.throwIfDisposed(), Mo(this);
|
|
508
508
|
};
|
|
509
509
|
r().prototype.log1p = function() {
|
|
510
510
|
return this.throwIfDisposed(), yo(this);
|
|
@@ -513,13 +513,13 @@ r().prototype.logicalAnd = function(t) {
|
|
|
513
513
|
return this.throwIfDisposed(), S(this, t);
|
|
514
514
|
};
|
|
515
515
|
r().prototype.logicalNot = function() {
|
|
516
|
-
return this.throwIfDisposed(),
|
|
516
|
+
return this.throwIfDisposed(), G(this);
|
|
517
517
|
};
|
|
518
518
|
r().prototype.logicalOr = function(t) {
|
|
519
519
|
return this.throwIfDisposed(), tt(this, t);
|
|
520
520
|
};
|
|
521
521
|
r().prototype.logicalXor = function(t) {
|
|
522
|
-
return this.throwIfDisposed(),
|
|
522
|
+
return this.throwIfDisposed(), As(this, t);
|
|
523
523
|
};
|
|
524
524
|
r().prototype.matMul = function(t, o, s) {
|
|
525
525
|
return this.throwIfDisposed(), v(this, t, o, s);
|
|
@@ -528,7 +528,7 @@ r().prototype.maxPool = function(t, o, s, n) {
|
|
|
528
528
|
return this.throwIfDisposed(), Z(this, t, o, s, n);
|
|
529
529
|
};
|
|
530
530
|
r().prototype.max = function(t, o) {
|
|
531
|
-
return this.throwIfDisposed(),
|
|
531
|
+
return this.throwIfDisposed(), Oo(this, t, o);
|
|
532
532
|
};
|
|
533
533
|
r().prototype.maximum = function(t) {
|
|
534
534
|
return this.throwIfDisposed(), Ct(this, t);
|
|
@@ -546,10 +546,10 @@ r().prototype.mirrorPad = function(t, o) {
|
|
|
546
546
|
return this.throwIfDisposed(), Hs(this, t, o);
|
|
547
547
|
};
|
|
548
548
|
r().prototype.mod = function(t) {
|
|
549
|
-
return this.throwIfDisposed(),
|
|
549
|
+
return this.throwIfDisposed(), jo(this, t);
|
|
550
550
|
};
|
|
551
551
|
r().prototype.mul = function(t) {
|
|
552
|
-
return this.throwIfDisposed(),
|
|
552
|
+
return this.throwIfDisposed(), M(this, t);
|
|
553
553
|
};
|
|
554
554
|
r().prototype.neg = function() {
|
|
555
555
|
return this.throwIfDisposed(), N(this);
|
|
@@ -573,22 +573,22 @@ r().prototype.pool = function(t, o, s, n, e, i) {
|
|
|
573
573
|
return this.throwIfDisposed(), Rs(this, t, o, s, n, e, i);
|
|
574
574
|
};
|
|
575
575
|
r().prototype.pow = function(t) {
|
|
576
|
-
return this.throwIfDisposed(),
|
|
576
|
+
return this.throwIfDisposed(), Mt(this, t);
|
|
577
577
|
};
|
|
578
578
|
r().prototype.prelu = function(t) {
|
|
579
579
|
return this.throwIfDisposed(), qo(this, t);
|
|
580
580
|
};
|
|
581
581
|
r().prototype.prod = function(t, o) {
|
|
582
|
-
return this.throwIfDisposed(),
|
|
582
|
+
return this.throwIfDisposed(), Xs(this, t, o);
|
|
583
583
|
};
|
|
584
584
|
r().prototype.reciprocal = function() {
|
|
585
585
|
return this.throwIfDisposed(), Zs(this);
|
|
586
586
|
};
|
|
587
587
|
r().prototype.relu = function() {
|
|
588
|
-
return this.throwIfDisposed(),
|
|
588
|
+
return this.throwIfDisposed(), Wo(this);
|
|
589
589
|
};
|
|
590
590
|
r().prototype.relu6 = function() {
|
|
591
|
-
return this.throwIfDisposed(),
|
|
591
|
+
return this.throwIfDisposed(), Ko(this);
|
|
592
592
|
};
|
|
593
593
|
r().prototype.reshapeAs = function(t) {
|
|
594
594
|
return this.throwIfDisposed(), l(this, t.shape);
|
|
@@ -636,36 +636,36 @@ r().prototype.slice = function(t, o) {
|
|
|
636
636
|
return this.throwIfDisposed(), T(this, t, o);
|
|
637
637
|
};
|
|
638
638
|
r().prototype.softmax = function(t) {
|
|
639
|
-
return this.throwIfDisposed(),
|
|
639
|
+
return this.throwIfDisposed(), Go(this, t);
|
|
640
640
|
};
|
|
641
641
|
r().prototype.softplus = function() {
|
|
642
642
|
return this.throwIfDisposed(), R(this);
|
|
643
643
|
};
|
|
644
644
|
r().prototype.spaceToBatchND = function(t, o) {
|
|
645
|
-
return this.throwIfDisposed(),
|
|
645
|
+
return this.throwIfDisposed(), X(this, t, o);
|
|
646
646
|
};
|
|
647
647
|
r().prototype.split = function(t, o) {
|
|
648
|
-
return this.throwIfDisposed(),
|
|
648
|
+
return this.throwIfDisposed(), z(this, t, o);
|
|
649
649
|
};
|
|
650
650
|
r().prototype.sqrt = function() {
|
|
651
|
-
return this.throwIfDisposed(),
|
|
651
|
+
return this.throwIfDisposed(), Ot(this);
|
|
652
652
|
};
|
|
653
653
|
r().prototype.square = function() {
|
|
654
|
-
return this.throwIfDisposed(),
|
|
654
|
+
return this.throwIfDisposed(), At(this);
|
|
655
655
|
};
|
|
656
656
|
r().prototype.squaredDifference = function(t) {
|
|
657
657
|
return this.throwIfDisposed(), vo(this, t);
|
|
658
658
|
};
|
|
659
659
|
r().prototype.squeeze = function(t) {
|
|
660
|
-
return this.throwIfDisposed(),
|
|
660
|
+
return this.throwIfDisposed(), Xo(this, t);
|
|
661
661
|
};
|
|
662
662
|
r().prototype.stack = function(t, o) {
|
|
663
663
|
this.throwIfDisposed();
|
|
664
|
-
const s = t instanceof
|
|
664
|
+
const s = t instanceof j ? [this, t] : [this, ...t];
|
|
665
665
|
return Vo(s, o);
|
|
666
666
|
};
|
|
667
667
|
r().prototype.step = function(t) {
|
|
668
|
-
return this.throwIfDisposed(),
|
|
668
|
+
return this.throwIfDisposed(), zo(this, t);
|
|
669
669
|
};
|
|
670
670
|
r().prototype.stridedSlice = function(t, o, s, n, e, i, p, a) {
|
|
671
671
|
return this.throwIfDisposed(), nr(this, t, o, s, n, e, i, p, a);
|
package/package.json
CHANGED
package/dist/complex-DjxcVmoX.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { A as t, B as s, ab as n, E as m, ac as r } from "./index-DOvlwCh-.js";
|
|
2
|
-
function l(o, c) {
|
|
3
|
-
const a = s(o, "real", "complex"), e = s(c, "imag", "complex");
|
|
4
|
-
n(a.shape, e.shape, `real and imag shapes, ${a.shape} and ${e.shape}, must match in call to tf.complex().`);
|
|
5
|
-
const p = { real: a, imag: e };
|
|
6
|
-
return m.runKernel(r, p);
|
|
7
|
-
}
|
|
8
|
-
const i = /* @__PURE__ */ t({ complex_: l });
|
|
9
|
-
export {
|
|
10
|
-
i as c
|
|
11
|
-
};
|
package/dist/concat-BV8bt5H-.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { A as s, l as a, G as p, D as i, E as l, H as f } from "./index-DOvlwCh-.js";
|
|
2
|
-
function h(n, e = 0) {
|
|
3
|
-
a(n.length >= 1, () => "Pass at least one tensor to concat");
|
|
4
|
-
const t = p(n, "tensors", "concat", "string_or_numeric");
|
|
5
|
-
if (t[0].dtype === "complex64" && t.forEach((o) => {
|
|
6
|
-
if (o.dtype !== "complex64")
|
|
7
|
-
throw new Error(`Cannot concatenate complex64 tensors with a tensor
|
|
8
|
-
with dtype ${o.dtype}. `);
|
|
9
|
-
}), t.length === 1)
|
|
10
|
-
return i(t[0]);
|
|
11
|
-
const r = t, c = { axis: e };
|
|
12
|
-
return l.runKernel(f, r, c);
|
|
13
|
-
}
|
|
14
|
-
const u = /* @__PURE__ */ s({ concat_: h });
|
|
15
|
-
export {
|
|
16
|
-
u as c
|
|
17
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { A as o, B as a, l as i, E as m, I as p } from "./index-DOvlwCh-.js";
|
|
2
|
-
function c(t, n = 0) {
|
|
3
|
-
const s = a(t, "x", "expandDims", "string_or_numeric");
|
|
4
|
-
i(n <= s.rank, () => "Axis must be <= rank of the tensor");
|
|
5
|
-
const r = { input: s }, e = { dim: n };
|
|
6
|
-
return m.runKernel(p, r, e);
|
|
7
|
-
}
|
|
8
|
-
const x = /* @__PURE__ */ o({ expandDims_: c });
|
|
9
|
-
export {
|
|
10
|
-
x as e
|
|
11
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { A as r, B as x, E as p, am as E, an as $, ao as d, af as h, c as S, x as K } from "./index-DOvlwCh-.js";
|
|
2
|
-
import { e as _ } from "./axis_util-BaG7mf5A.js";
|
|
3
|
-
import { r as m } from "./reshape-ByE68wS9.js";
|
|
4
|
-
import { s as T } from "./sum-DWAtNGez.js";
|
|
5
|
-
function b(s, o = null, n = !1) {
|
|
6
|
-
const a = { x: x(s, "x", "max") }, e = { reductionIndices: o, keepDims: n };
|
|
7
|
-
return p.runKernel(E, a, e);
|
|
8
|
-
}
|
|
9
|
-
const A = /* @__PURE__ */ r({ max_: b });
|
|
10
|
-
function I(s) {
|
|
11
|
-
const n = { x: x(s, "x", "exp") };
|
|
12
|
-
return p.runKernel($, n);
|
|
13
|
-
}
|
|
14
|
-
const M = /* @__PURE__ */ r({ exp_: I });
|
|
15
|
-
function N(s) {
|
|
16
|
-
const n = { x: x(s, "x", "log", "float32") };
|
|
17
|
-
return p.runKernel(d, n);
|
|
18
|
-
}
|
|
19
|
-
const v = /* @__PURE__ */ r({ log_: N });
|
|
20
|
-
function w(s, o = null, n = !1) {
|
|
21
|
-
const t = x(s, "x", "logSumExp"), a = h(o, t.shape), e = A(
|
|
22
|
-
t,
|
|
23
|
-
a,
|
|
24
|
-
!0
|
|
25
|
-
/* keepDims */
|
|
26
|
-
), l = S(t, e), i = M(l), f = T(i, a), u = v(f), c = K(m(e, u.shape), u);
|
|
27
|
-
if (n) {
|
|
28
|
-
const g = _(c.shape, a);
|
|
29
|
-
return m(c, g);
|
|
30
|
-
}
|
|
31
|
-
return c;
|
|
32
|
-
}
|
|
33
|
-
const P = /* @__PURE__ */ r({ logSumExp_: w });
|
|
34
|
-
export {
|
|
35
|
-
v as a,
|
|
36
|
-
M as e,
|
|
37
|
-
P as l,
|
|
38
|
-
A as m
|
|
39
|
-
};
|
package/dist/mat_mul-SjpJRLyL.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { A as m, B as s, L as M, E as c, M as p } from "./index-DOvlwCh-.js";
|
|
2
|
-
function f(e, n, o = !1, l = !1) {
|
|
3
|
-
let a = s(e, "a", "matMul"), t = s(n, "b", "matMul");
|
|
4
|
-
[a, t] = M(a, t);
|
|
5
|
-
const r = { a, b: t }, u = { transposeA: o, transposeB: l };
|
|
6
|
-
return c.runKernel(p, r, u);
|
|
7
|
-
}
|
|
8
|
-
const i = /* @__PURE__ */ m({ matMul_: f });
|
|
9
|
-
export {
|
|
10
|
-
i as m
|
|
11
|
-
};
|
package/dist/range-BklejeeW.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { E as e, a2 as f } from "./index-DOvlwCh-.js";
|
|
2
|
-
function E(a, n, r = 1, o = "float32") {
|
|
3
|
-
if (r === 0)
|
|
4
|
-
throw new Error("Cannot have a step of zero");
|
|
5
|
-
const t = { start: a, stop: n, step: r, dtype: o };
|
|
6
|
-
return e.runKernel(f, {}, t);
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
E as r
|
|
10
|
-
};
|
package/dist/relu-CP0ZcxWO.js
DELETED
package/dist/split-CVLc0w--.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { A as p, B as i, E as a, U as c } from "./index-DOvlwCh-.js";
|
|
2
|
-
function e(t, s, n = 0) {
|
|
3
|
-
const o = { x: i(t, "x", "split") }, r = { numOrSizeSplits: s, axis: n };
|
|
4
|
-
return a.runKernel(c, o, r);
|
|
5
|
-
}
|
|
6
|
-
const u = /* @__PURE__ */ p({ split_: e });
|
|
7
|
-
export {
|
|
8
|
-
u as s
|
|
9
|
-
};
|
package/dist/squeeze-C7Z2srUo.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { A as o, B as n, V as a } from "./index-DOvlwCh-.js";
|
|
2
|
-
import { r as t } from "./reshape-ByE68wS9.js";
|
|
3
|
-
function p(s, r) {
|
|
4
|
-
const e = n(s, "x", "squeeze", "string_or_numeric");
|
|
5
|
-
return t(e, a(e.shape, r).newShape);
|
|
6
|
-
}
|
|
7
|
-
const i = /* @__PURE__ */ o({ squeeze_: p });
|
|
8
|
-
export {
|
|
9
|
-
i as s
|
|
10
|
-
};
|
package/dist/tensor-DJoc7gJU.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { $ as n, a0 as o, a1 as s } from "./index-DOvlwCh-.js";
|
|
2
|
-
function h(r, e) {
|
|
3
|
-
n(r);
|
|
4
|
-
const a = o(r, e);
|
|
5
|
-
if (a.length !== 1)
|
|
6
|
-
throw new Error("tensor1d() requires values to be a flat/TypedArray");
|
|
7
|
-
return s(r, null, a, e);
|
|
8
|
-
}
|
|
9
|
-
export {
|
|
10
|
-
h as t
|
|
11
|
-
};
|