@genai-fi/nanogpt 0.6.3 → 0.7.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.js +11 -11
- package/dist/NanoGPTModel.d.ts +2 -2
- package/dist/NanoGPTModel.js +104 -136
- package/dist/{RealDiv-BYViZwhN.js → RealDiv-C4hOvYOZ.js} +26 -25
- package/dist/{Reshape-t7Kcikjk.js → Reshape-BLijOA8h.js} +5 -5
- package/dist/TeachableLLM.js +5 -5
- package/dist/{TiedEmbedding-9WeDwvjO.js → TiedEmbedding-BLltddza.js} +4 -4
- package/dist/{axis_util-Bu4h7XWV.js → axis_util-DaAl5MER.js} +3 -3
- package/dist/backend.d.ts +1 -0
- package/dist/backend.js +7 -0
- package/dist/backend_util-DWiwsi2N.js +749 -0
- package/dist/{broadcast_to-DARN-DBD.js → broadcast_to-C4v-j9yA.js} +2 -2
- package/dist/{concat-5aPGqw3Z.js → concat-CsHeR4zV.js} +8 -8
- package/dist/{dataset-pgqp-YfL.js → dataset-JDyjG3QR.js} +3 -3
- package/dist/{dropout-Bciw46HT.js → dropout-hpDwECTe.js} +7 -7
- package/dist/{gather-DjyCjmOD.js → gather-D0_gPiBz.js} +4 -4
- package/dist/gelu-uyHP1x1f.js +26 -0
- package/dist/gpgpu_math-DJm3ZTAf.js +2371 -0
- package/dist/index-BPPzKVdR.js +12099 -0
- package/dist/{index-BAzbokzv.js → index-C0dhsYom.js} +405 -389
- package/dist/{kernel_funcs_utils-CUxJCg0g.js → kernel_funcs_utils-CwRTFqrc.js} +31 -30
- 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 +4 -4
- package/dist/layers/TiedEmbedding.js +5 -5
- package/dist/layers/TransformerBlock.js +1 -1
- package/dist/loader/loadTransformers.js +1 -1
- package/dist/loader/oldZipLoad.js +5 -5
- package/dist/{log_sum_exp-YEo2h3gb.js → log_sum_exp-D086OgZJ.js} +15 -15
- package/dist/main.d.ts +2 -0
- package/dist/main.js +9 -5
- package/dist/{mat_mul-7121rsJk.js → mat_mul-1nwdPkQ_.js} +4 -4
- package/dist/{max-DtlIuVeW.js → max-BQc2Aj-I.js} +4 -4
- package/dist/{mulmat_packed_gpu-D4nKF7Je.js → mulmat_packed_gpu-Gzf3I9UV.js} +1 -1
- package/dist/non_max_suppression_impl-CsEgBuMA.js +134 -0
- package/dist/{ones-BBlSRqn1.js → ones-D63HpSF_.js} +2 -2
- package/dist/ops/appendCache.js +3 -3
- package/dist/ops/attentionMask.js +1 -1
- package/dist/ops/cpu/appendCache.js +8 -8
- package/dist/ops/cpu/attentionMask.js +9 -9
- package/dist/ops/cpu/fusedSoftmax.js +17 -11
- package/dist/ops/cpu/gatherSub.js +7 -7
- package/dist/ops/cpu/gelu.js +13 -13
- package/dist/ops/cpu/matMulGelu.js +36 -24
- package/dist/ops/cpu/matMulMul.js +14 -8
- package/dist/ops/cpu/mulDropout.js +9 -3
- package/dist/ops/cpu/normRMS.js +5 -5
- 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/fusedSoftmax.js +1 -1
- package/dist/ops/gatherSub.js +1 -1
- package/dist/ops/gelu.js +2 -2
- package/dist/ops/grads/attentionMask.js +1 -1
- package/dist/ops/grads/fusedSoftmax.js +2 -2
- package/dist/ops/grads/gelu.js +3 -24
- package/dist/ops/grads/matMulGelu.js +5 -5
- package/dist/ops/grads/normRMS.js +6 -6
- package/dist/ops/grads/qkv.js +1 -1
- package/dist/ops/grads/rope.js +3 -3
- package/dist/ops/matMulGelu.js +1 -1
- package/dist/ops/matMulMul.js +1 -1
- package/dist/ops/mulDrop.js +1 -1
- package/dist/ops/normRMS.js +1 -1
- package/dist/ops/qkv.js +1 -1
- package/dist/ops/rope.js +4 -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 +4 -4
- package/dist/ops/webgl/gatherSub.js +1 -1
- package/dist/ops/webgl/gelu.js +2 -2
- package/dist/ops/webgl/log.js +5 -5
- package/dist/ops/webgl/matMulGelu.js +17 -17
- package/dist/ops/webgl/matMulMul.js +1 -1
- package/dist/ops/webgl/mulDropout.js +4 -4
- 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/webgpu/appendCache.d.ts +1 -0
- package/dist/ops/webgpu/appendCache.js +56 -0
- package/dist/ops/webgpu/attentionMask.d.ts +1 -0
- package/dist/ops/webgpu/attentionMask.js +64 -0
- package/dist/ops/webgpu/gatherSub.d.ts +1 -0
- package/dist/ops/webgpu/gatherSub.js +37 -0
- package/dist/ops/webgpu/gelu.d.ts +14 -0
- package/dist/ops/webgpu/gelu.js +86 -0
- package/dist/ops/webgpu/index.d.ts +0 -0
- package/dist/ops/webgpu/index.js +8 -0
- package/dist/ops/webgpu/normRMS.d.ts +1 -0
- package/dist/ops/webgpu/normRMS.js +115 -0
- package/dist/ops/webgpu/qkv.d.ts +1 -0
- package/dist/ops/webgpu/qkv.js +56 -0
- package/dist/ops/webgpu/rope.d.ts +1 -0
- package/dist/ops/webgpu/rope.js +68 -0
- package/dist/ops/webgpu/scatterSub.d.ts +1 -0
- package/dist/ops/webgpu/scatterSub.js +37 -0
- package/dist/{ops-C0sQEcPw.js → ops-CIQLNshk.js} +452 -503
- package/dist/{random_width-DWzaOgrn.js → random_width-DkYP8W8N.js} +143 -144
- package/dist/{range-DYsrnfiy.js → range-CYzpQY53.js} +1 -1
- package/dist/{reciprocal-CJQeasVa.js → reciprocal-_A9yv27J.js} +1 -1
- package/dist/{register_all_kernels-BfFCQAqs.js → register_all_kernels-guvSxp7M.js} +202 -200
- package/dist/{reshape-krWGKraP.js → reshape-BMUzc1UY.js} +3 -3
- package/dist/{scatter_nd_util-93ln7Hut.js → scatter_nd_util-IRBqKz_b.js} +3 -3
- package/dist/{selu_util-sntGesxr.js → selu_util-Dt_iuXaq.js} +6 -6
- package/dist/shared-BNa2q6jD.js +69 -0
- package/dist/{shared-Ca6iDobD.js → shared-CDu9S76h.js} +541 -606
- package/dist/{sin-D_h-qCSx.js → sin-Cocju-BY.js} +6 -6
- package/dist/{softmax-fsdtf6JC.js → softmax-GPNK3o-U.js} +3 -3
- package/dist/{split-eiktj-6L.js → split-CHzJjxDv.js} +4 -4
- package/dist/{stack-dfEEz2OY.js → stack-Dpgg_1W1.js} +2 -2
- package/dist/{sum-BE_Irnim.js → sum-B8wEpKsg.js} +5 -5
- package/dist/{tensor-Xyi595sG.js → tensor-RvZVNmg0.js} +1 -1
- package/dist/{tensor2d-CPEkynbH.js → tensor2d-B_kyod7_.js} +1 -1
- package/dist/training/AdamExt.js +1 -1
- package/dist/training/DatasetBuilder.js +2 -2
- package/dist/training/Evaluator.js +1 -1
- package/dist/training/FullTrainer.js +20 -20
- package/dist/training/Trainer.d.ts +5 -6
- package/dist/training/Trainer.js +59 -60
- package/dist/training/sparseCrossEntropy.js +4 -4
- package/dist/utilities/dummy.js +19 -19
- package/dist/utilities/generate.js +15 -16
- package/dist/utilities/multinomialCPU.d.ts +2 -0
- package/dist/utilities/multinomialCPU.js +13 -0
- package/dist/utilities/performance.d.ts +2 -0
- package/dist/utilities/performance.js +16 -0
- package/dist/utilities/profile.d.ts +1 -0
- package/dist/utilities/profile.js +9 -6
- package/dist/utilities/safetensors.js +2 -2
- package/dist/utilities/weights.js +2 -2
- package/dist/{variable-wSS22xj5.js → variable-DXEUOwew.js} +1 -1
- package/dist/webgpu_util-g13LvDIv.js +625 -0
- package/dist/{zeros-YJDE7oRb.js → zeros-DCPCdFGq.js} +8 -8
- package/package.json +2 -1
- package/dist/gpgpu_math-CNslybmD.js +0 -3115
- package/dist/norm-CzltS9Fz.js +0 -86
|
@@ -148,6 +148,9 @@ function z(e) {
|
|
|
148
148
|
t *= e[n];
|
|
149
149
|
return t;
|
|
150
150
|
}
|
|
151
|
+
function Ls(e) {
|
|
152
|
+
return e.length === 0;
|
|
153
|
+
}
|
|
151
154
|
function xt(e, t) {
|
|
152
155
|
if (e === t)
|
|
153
156
|
return !0;
|
|
@@ -161,14 +164,14 @@ function xt(e, t) {
|
|
|
161
164
|
function Ne(e) {
|
|
162
165
|
return e % 1 === 0;
|
|
163
166
|
}
|
|
164
|
-
function
|
|
167
|
+
function _s(e) {
|
|
165
168
|
const t = Math.ceil(Math.sqrt(e));
|
|
166
169
|
return [t, Math.ceil(e / t)];
|
|
167
170
|
}
|
|
168
171
|
function ut(e, t) {
|
|
169
172
|
return t <= e.length ? e : e + " ".repeat(t - e.length);
|
|
170
173
|
}
|
|
171
|
-
function
|
|
174
|
+
function Os(e, t = (r) => 0, n, s) {
|
|
172
175
|
return new Promise((r, a) => {
|
|
173
176
|
let o = 0;
|
|
174
177
|
const i = () => {
|
|
@@ -187,7 +190,7 @@ function _s(e, t = (r) => 0, n, s) {
|
|
|
187
190
|
i();
|
|
188
191
|
});
|
|
189
192
|
}
|
|
190
|
-
function
|
|
193
|
+
function Gs(e, t) {
|
|
191
194
|
let n = 1, s = -1;
|
|
192
195
|
for (let a = 0; a < e.length; ++a)
|
|
193
196
|
if (e[a] >= 0)
|
|
@@ -214,7 +217,7 @@ function $e(e, t) {
|
|
|
214
217
|
const n = t.length;
|
|
215
218
|
return e = e == null ? t.map((s, r) => r) : [].concat(e), y(e.every((s) => s >= -n && s < n), () => `All values in axis param must be in range [-${n}, ${n}) but got axis ${e}`), y(e.every((s) => Ne(s)), () => `All values in axis param must be integers but got axis ${e}`), e.map((s) => s < 0 ? n + s : s);
|
|
216
219
|
}
|
|
217
|
-
function
|
|
220
|
+
function Us(e, t) {
|
|
218
221
|
const n = [], s = [], r = t != null && Array.isArray(t) && t.length === 0, a = t == null || r ? null : $e(t, e).sort();
|
|
219
222
|
let o = 0;
|
|
220
223
|
for (let i = 0; i < e.length; ++i) {
|
|
@@ -227,7 +230,7 @@ function Gs(e, t) {
|
|
|
227
230
|
}
|
|
228
231
|
return { newShape: n, keptDims: s };
|
|
229
232
|
}
|
|
230
|
-
function
|
|
233
|
+
function zs(e, t) {
|
|
231
234
|
return te(e, t);
|
|
232
235
|
}
|
|
233
236
|
function te(e, t) {
|
|
@@ -254,7 +257,7 @@ function Ce(e, t) {
|
|
|
254
257
|
function Pe(e) {
|
|
255
258
|
return e === "bool" || e === "complex64" || e === "float32" || e === "int32" || e === "string";
|
|
256
259
|
}
|
|
257
|
-
function
|
|
260
|
+
function Vs(e, t) {
|
|
258
261
|
return !(t === "complex64" || t === "float32" && e !== "complex64" || t === "int32" && e !== "float32" && e !== "complex64" || t === "bool" && e === "bool");
|
|
259
262
|
}
|
|
260
263
|
function It(e) {
|
|
@@ -287,7 +290,7 @@ function yt(e) {
|
|
|
287
290
|
function dt(e) {
|
|
288
291
|
return !!(e && e.constructor && e.call && e.apply);
|
|
289
292
|
}
|
|
290
|
-
function
|
|
293
|
+
function Ws(e, t) {
|
|
291
294
|
for (let n = t; n < e; ++n)
|
|
292
295
|
if (e % n === 0)
|
|
293
296
|
return n;
|
|
@@ -326,7 +329,7 @@ function ct(e, t, n = !1) {
|
|
|
326
329
|
throw new Error(`[${e}] does not match the input size ${t.length}${n ? " for a complex tensor" : ""}.`);
|
|
327
330
|
return ee(0, e, t, n);
|
|
328
331
|
}
|
|
329
|
-
function
|
|
332
|
+
function js(e, t) {
|
|
330
333
|
if (Array.isArray(e))
|
|
331
334
|
return e;
|
|
332
335
|
if (t === "float32")
|
|
@@ -352,7 +355,7 @@ function ne(e, t) {
|
|
|
352
355
|
return new Uint8Array(e);
|
|
353
356
|
throw new Error(`Unknown data type ${t}`);
|
|
354
357
|
}
|
|
355
|
-
function
|
|
358
|
+
function qs(e, t) {
|
|
356
359
|
const n = e.reduce((s, r) => s * r, 1);
|
|
357
360
|
if (t == null || t === "float32")
|
|
358
361
|
return ct(e, new Float32Array(n));
|
|
@@ -367,7 +370,7 @@ function Ct(e) {
|
|
|
367
370
|
y(Number.isInteger(t) && t >= 0, () => `Tensor must have a shape comprised of positive integers but got shape [${e}].`);
|
|
368
371
|
});
|
|
369
372
|
}
|
|
370
|
-
function
|
|
373
|
+
function Ks(e, t, n) {
|
|
371
374
|
if (t === 0)
|
|
372
375
|
return 0;
|
|
373
376
|
if (t === 1)
|
|
@@ -377,7 +380,7 @@ function qs(e, t, n) {
|
|
|
377
380
|
s += n[r] * e[r];
|
|
378
381
|
return s;
|
|
379
382
|
}
|
|
380
|
-
function
|
|
383
|
+
function Hs(e, t, n) {
|
|
381
384
|
if (t === 0)
|
|
382
385
|
return [];
|
|
383
386
|
if (t === 1)
|
|
@@ -539,7 +542,7 @@ function Lt(e, t) {
|
|
|
539
542
|
return n.set(e, s), n.get(e);
|
|
540
543
|
}
|
|
541
544
|
}
|
|
542
|
-
const Ke = "Abs",
|
|
545
|
+
const Ke = "Abs", Xs = "Acos", Js = "Acosh", ae = "Add", Ys = "AddN", Zs = "All", Qs = "Any", tr = "ArgMax", er = "ArgMin", nr = "Asin", sr = "Asinh", rr = "Atan", ar = "Atanh", or = "Atan2", ir = "AvgPool", cr = "AvgPoolGrad", lr = "AvgPool3D", ur = "AvgPool3DGrad", hr = "BatchMatMul", dr = "BatchToSpaceND", fr = "Bincount", gr = "BitwiseAnd", mr = "BroadcastTo", pr = "BroadcastArgs", oe = "Cast", yr = "Ceil", br = "ClipByValue", wr = "Complex", He = "ComplexAbs", Sr = "Concat", kr = "Conv2D", Ir = "Conv2DBackpropFilter", Tr = "Conv2DBackpropInput", Er = "Conv3D", Ar = "Conv3DBackpropFilterV2", vr = "Conv3DBackpropInputV2", Br = "Cos", Mr = "Cosh", Dr = "Cumprod", Fr = "Cumsum", Rr = "CropAndResize", xr = "DenseBincount", Nr = "DepthToSpace", $r = "DepthwiseConv2dNative", Cr = "DepthwiseConv2dNativeBackpropFilter", Pr = "DepthwiseConv2dNativeBackpropInput", Lr = "Diag", _r = "Dilation2D", Or = "Dilation2DBackpropInput", Gr = "Dilation2DBackpropFilter", Ur = "Draw", Xe = "RealDiv", zr = "Einsum", Vr = "Elu", Wr = "EluGrad", jr = "Erf", qr = "Equal", Kr = "Exp", Hr = "ExpandDims", Xr = "Expm1", Jr = "FFT", Je = "Fill", Yr = "FlipLeftRight", Zr = "Floor", Ye = "FloorDiv", Qr = "FusedBatchNorm", ta = "GatherV2", ea = "GatherNd", na = "Greater", sa = "GreaterEqual", ie = "Identity", ra = "IFFT", aa = "Imag", oa = "IsFinite", ia = "IsInf", ca = "IsNan", la = "LeakyRelu", ua = "Less", ha = "LessEqual", da = "LinSpace", fa = "Log", ga = "Log1p", ma = "LogicalAnd", pa = "LogicalNot", ya = "LogicalOr", ba = "LogSoftmax", wa = "LRN", Sa = "LRNGrad", ka = "Max", Ze = "Maximum", Ia = "MaxPool", Ta = "MaxPoolGrad", Ea = "MaxPool3D", Aa = "MaxPool3DGrad", va = "MaxPoolWithArgmax", Ba = "Mean", Ma = "Min", Da = "Minimum", Fa = "MirrorPad", Ra = "Mod", xa = "Multinomial", Qe = "Multiply", Na = "Neg", $a = "NotEqual", Ca = "NonMaxSuppressionV3", Pa = "NonMaxSuppressionV4", La = "NonMaxSuppressionV5", _a = "OnesLike", Oa = "OneHot", Ga = "Pack", Ua = "PadV2", tn = "Pow", za = "Prelu", Va = "Prod", Wa = "RaggedGather", ja = "RaggedRange", qa = "RaggedTensorToTensor", Ka = "Range", Ha = "Real", Xa = "Reciprocal", Ja = "Relu", Ya = "Reshape", Za = "ResizeNearestNeighbor", Qa = "ResizeNearestNeighborGrad", to = "ResizeBilinear", eo = "ResizeBilinearGrad", no = "Relu6", so = "Reverse", ro = "Round", ao = "Rsqrt", oo = "ScatterNd", io = "TensorScatterUpdate", co = "SearchSorted", lo = "Select", uo = "Selu", ho = "Slice", fo = "Sin", go = "Sinh", mo = "Sign", po = "Sigmoid", yo = "Softplus", en = "Sqrt", bo = "Sum", wo = "SpaceToBatchND", So = "SplitV", ko = "Softmax", Io = "SparseFillEmptyRows", To = "SparseReshape", Eo = "SparseSegmentMean", Ao = "SparseSegmentSum", vo = "SparseToDense", Bo = "SquaredDifference", Mo = "Square", Do = "StaticRegexReplace", Fo = "StridedSlice", Ro = "StringNGrams", xo = "StringSplit", No = "StringToHashBucketFast", nn = "Sub", $o = "Tan", Co = "Tanh", Po = "Tile", Lo = "TopK", _o = "Transform", Oo = "Transpose", Go = "Unique", Uo = "Unpack", zo = "UnsortedSegmentSum", sn = "ZerosLike", Vo = "Step", Wo = "FromPixels", jo = "RotateWithOffset", qo = "_FusedMatMul", Ko = "FusedConv2D", Ho = "FusedDepthwiseConv2D";
|
|
543
546
|
/**
|
|
544
547
|
* @license
|
|
545
548
|
* Copyright 2018 Google LLC. All Rights Reserved.
|
|
@@ -559,7 +562,7 @@ const Ke = "Abs", Hs = "Acos", Xs = "Acosh", ae = "Add", Js = "AddN", Ys = "All"
|
|
|
559
562
|
function O(...e) {
|
|
560
563
|
S().getBool("IS_TEST") || S().getBool("PROD") || console.warn(...e);
|
|
561
564
|
}
|
|
562
|
-
function
|
|
565
|
+
function Xo(...e) {
|
|
563
566
|
S().getBool("IS_TEST") || S().getBool("PROD") || console.log(...e);
|
|
564
567
|
}
|
|
565
568
|
/**
|
|
@@ -597,11 +600,11 @@ function Wt(e) {
|
|
|
597
600
|
}
|
|
598
601
|
return n;
|
|
599
602
|
}
|
|
600
|
-
function
|
|
603
|
+
function Jo(e) {
|
|
601
604
|
const { kernelName: t, backendName: n } = e, s = ce(t, n);
|
|
602
605
|
ft.has(s) && O(`The kernel '${t}' for backend '${n}' is already registered`), ft.set(s, e);
|
|
603
606
|
}
|
|
604
|
-
function
|
|
607
|
+
function Yo(e) {
|
|
605
608
|
const { kernelName: t } = e;
|
|
606
609
|
Tt.has(t) && S().getBool("DEBUG") && O(`Overriding the gradient for '${t}'`), Tt.set(t, e);
|
|
607
610
|
}
|
|
@@ -643,7 +646,7 @@ function le(e) {
|
|
|
643
646
|
* limitations under the License.
|
|
644
647
|
* =============================================================================
|
|
645
648
|
*/
|
|
646
|
-
function
|
|
649
|
+
function Zo(e, t) {
|
|
647
650
|
return t === "string" ? ue(e) : _t([e], t);
|
|
648
651
|
}
|
|
649
652
|
function rn(e, t) {
|
|
@@ -769,8 +772,8 @@ class cn {
|
|
|
769
772
|
for (const m in a) {
|
|
770
773
|
const p = a[m];
|
|
771
774
|
if (p != null) {
|
|
772
|
-
const
|
|
773
|
-
d += `${m}: ${w}D ${w > 0 ?
|
|
775
|
+
const g = p.shape || n.shape, w = g.length;
|
|
776
|
+
d += `${m}: ${w}D ${w > 0 ? g : ""} `;
|
|
774
777
|
}
|
|
775
778
|
}
|
|
776
779
|
console.log(`%c${c} %c${i} %c${l}D ${h} %c${u} %c${d} %c${o}`, "font-weight:bold", "color:red", "color:blue", "color: orange", "color: green", "color: steelblue");
|
|
@@ -803,7 +806,7 @@ function ln(e, t, n) {
|
|
|
803
806
|
let m = !1;
|
|
804
807
|
for (let p = 0; p < t.length; p++)
|
|
805
808
|
if (s[d.id]) {
|
|
806
|
-
l.outputs.forEach((
|
|
809
|
+
l.outputs.forEach((g) => s[g.id] = !0), m = !0, r[l.id] = !0;
|
|
807
810
|
break;
|
|
808
811
|
}
|
|
809
812
|
if (m)
|
|
@@ -908,8 +911,8 @@ function ht(e, t, n, s, r, a = !0) {
|
|
|
908
911
|
const o = n === "complex64" ? 2 : 1, i = t[0], c = t.length;
|
|
909
912
|
if (c === 0) {
|
|
910
913
|
if (n === "complex64") {
|
|
911
|
-
const
|
|
912
|
-
return [ot(
|
|
914
|
+
const g = it(e);
|
|
915
|
+
return [ot(g[0], 0, n)];
|
|
913
916
|
}
|
|
914
917
|
return n === "bool" ? [he(e[0])] : [e[0].toString()];
|
|
915
918
|
}
|
|
@@ -927,8 +930,8 @@ function ht(e, t, n, s, r, a = !0) {
|
|
|
927
930
|
}
|
|
928
931
|
const l = t.slice(1), u = s.slice(1), h = s[0] * o, d = [];
|
|
929
932
|
if (i > qt) {
|
|
930
|
-
for (let
|
|
931
|
-
const w =
|
|
933
|
+
for (let g = 0; g < at; g++) {
|
|
934
|
+
const w = g * h, I = w + h;
|
|
932
935
|
d.push(...ht(
|
|
933
936
|
e.slice(w, I),
|
|
934
937
|
l,
|
|
@@ -940,38 +943,38 @@ function ht(e, t, n, s, r, a = !0) {
|
|
|
940
943
|
));
|
|
941
944
|
}
|
|
942
945
|
d.push("...");
|
|
943
|
-
for (let
|
|
944
|
-
const w =
|
|
946
|
+
for (let g = i - at; g < i; g++) {
|
|
947
|
+
const w = g * h, I = w + h;
|
|
945
948
|
d.push(...ht(
|
|
946
949
|
e.slice(w, I),
|
|
947
950
|
l,
|
|
948
951
|
n,
|
|
949
952
|
u,
|
|
950
953
|
r,
|
|
951
|
-
|
|
954
|
+
g === i - 1
|
|
952
955
|
/* isLast */
|
|
953
956
|
));
|
|
954
957
|
}
|
|
955
958
|
} else
|
|
956
|
-
for (let
|
|
957
|
-
const w =
|
|
959
|
+
for (let g = 0; g < i; g++) {
|
|
960
|
+
const w = g * h, I = w + h;
|
|
958
961
|
d.push(...ht(
|
|
959
962
|
e.slice(w, I),
|
|
960
963
|
l,
|
|
961
964
|
n,
|
|
962
965
|
u,
|
|
963
966
|
r,
|
|
964
|
-
|
|
967
|
+
g === i - 1
|
|
965
968
|
/* isLast */
|
|
966
969
|
));
|
|
967
970
|
}
|
|
968
971
|
const m = c === 2 ? "," : "";
|
|
969
972
|
d[0] = "[" + (i > 0 ? d[0] + m : "");
|
|
970
|
-
for (let
|
|
971
|
-
d[
|
|
973
|
+
for (let g = 1; g < d.length - 1; g++)
|
|
974
|
+
d[g] = " " + d[g] + m;
|
|
972
975
|
let p = `,
|
|
973
976
|
`;
|
|
974
|
-
for (let
|
|
977
|
+
for (let g = 2; g < c; g++)
|
|
975
978
|
p += `
|
|
976
979
|
`;
|
|
977
980
|
return d[d.length - 1] = " " + d[d.length - 1] + "]" + (a ? "" : p), d;
|
|
@@ -1339,7 +1342,7 @@ function fe(e, t) {
|
|
|
1339
1342
|
}
|
|
1340
1343
|
return pn[e][t];
|
|
1341
1344
|
}
|
|
1342
|
-
function
|
|
1345
|
+
function Qo(e) {
|
|
1343
1346
|
return fe(e, "int32");
|
|
1344
1347
|
}
|
|
1345
1348
|
function ge(e) {
|
|
@@ -1370,7 +1373,7 @@ function K(e, t) {
|
|
|
1370
1373
|
const n = fe(e.dtype, t.dtype);
|
|
1371
1374
|
return [e.cast(n), t.cast(n)];
|
|
1372
1375
|
}
|
|
1373
|
-
function
|
|
1376
|
+
function ti(e, t) {
|
|
1374
1377
|
return t.some((n) => n.id === e.id);
|
|
1375
1378
|
}
|
|
1376
1379
|
function pe(e) {
|
|
@@ -1585,10 +1588,10 @@ class et {
|
|
|
1585
1588
|
* execution.
|
|
1586
1589
|
*/
|
|
1587
1590
|
clone(t) {
|
|
1588
|
-
const n =
|
|
1591
|
+
const n = f.runKernel(ie, { x: t }), s = { x: t }, r = (o) => ({
|
|
1589
1592
|
x: () => {
|
|
1590
1593
|
const i = "float32", c = { x: o }, l = { dtype: i };
|
|
1591
|
-
return
|
|
1594
|
+
return f.runKernel(
|
|
1592
1595
|
oe,
|
|
1593
1596
|
c,
|
|
1594
1597
|
// tslint:disable-next-line: no-unnecessary-type-assertion
|
|
@@ -1643,28 +1646,28 @@ class et {
|
|
|
1643
1646
|
let c;
|
|
1644
1647
|
const l = St(t) ? t.kernelName : this.state.activeScope != null ? this.state.activeScope.name : "";
|
|
1645
1648
|
if (St(t)) {
|
|
1646
|
-
const { kernelName: p, inputs:
|
|
1649
|
+
const { kernelName: p, inputs: g, attrs: w } = t;
|
|
1647
1650
|
this.backendName == null && this.backend;
|
|
1648
1651
|
const I = zt(p, this.backendName);
|
|
1649
1652
|
y(I != null, () => `Cannot find registered kernel '${p}' for backend '${this.backendName}'`), i = () => {
|
|
1650
1653
|
const _ = this.backend.numDataIds();
|
|
1651
|
-
c = I.kernelFunc({ inputs:
|
|
1654
|
+
c = I.kernelFunc({ inputs: g, attrs: w, backend: this.backend });
|
|
1652
1655
|
const X = Array.isArray(c) ? c : [c];
|
|
1653
1656
|
this.shouldCheckForMemLeaks() && this.checkKernelForMemLeak(p, _, X);
|
|
1654
1657
|
const J = X.map((rt) => rt.rank != null ? rt : this.makeTensorFromTensorInfo(rt));
|
|
1655
1658
|
if (r) {
|
|
1656
|
-
const rt = this.getTensorsForGradient(p,
|
|
1659
|
+
const rt = this.getTensorsForGradient(p, g, J);
|
|
1657
1660
|
s = this.saveTensorsForBackwardMode(rt);
|
|
1658
1661
|
}
|
|
1659
1662
|
return J;
|
|
1660
1663
|
};
|
|
1661
1664
|
} else {
|
|
1662
|
-
const { forwardFunc: p } = t,
|
|
1665
|
+
const { forwardFunc: p } = t, g = (w) => {
|
|
1663
1666
|
r && (s = w.map((I) => this.keep(this.clone(I))));
|
|
1664
1667
|
};
|
|
1665
1668
|
i = () => {
|
|
1666
1669
|
const w = this.backend.numDataIds();
|
|
1667
|
-
c = this.tidy(() => p(this.backend,
|
|
1670
|
+
c = this.tidy(() => p(this.backend, g));
|
|
1668
1671
|
const I = Array.isArray(c) ? c : [c];
|
|
1669
1672
|
return this.shouldCheckForMemLeaks() && this.checkKernelForMemLeak(l, w, I), I;
|
|
1670
1673
|
};
|
|
@@ -1956,7 +1959,7 @@ et.nextTensorId = 0;
|
|
|
1956
1959
|
et.nextVariableId = 0;
|
|
1957
1960
|
function bn(e) {
|
|
1958
1961
|
const t = Ge(z(e), "float32");
|
|
1959
|
-
return
|
|
1962
|
+
return f.makeTensor(t, e, "float32");
|
|
1960
1963
|
}
|
|
1961
1964
|
function be() {
|
|
1962
1965
|
const e = re();
|
|
@@ -1966,10 +1969,10 @@ function be() {
|
|
|
1966
1969
|
}
|
|
1967
1970
|
return je(e._tfengine.ENV), gn(() => e._tfengine), e._tfengine;
|
|
1968
1971
|
}
|
|
1969
|
-
const
|
|
1972
|
+
const f = be();
|
|
1970
1973
|
function wn(e, t) {
|
|
1971
1974
|
const n = { a: e, b: t };
|
|
1972
|
-
return
|
|
1975
|
+
return f.runKernel(ae, n);
|
|
1973
1976
|
}
|
|
1974
1977
|
/**
|
|
1975
1978
|
* @license
|
|
@@ -1990,7 +1993,7 @@ function wn(e, t) {
|
|
|
1990
1993
|
function Sn() {
|
|
1991
1994
|
return typeof navigator < "u" && navigator != null;
|
|
1992
1995
|
}
|
|
1993
|
-
function
|
|
1996
|
+
function ei(e) {
|
|
1994
1997
|
if (e || Sn()) {
|
|
1995
1998
|
if (e || (e = navigator), e.product === "ReactNative")
|
|
1996
1999
|
return !0;
|
|
@@ -2086,7 +2089,7 @@ function T(e, t, n, s = "numeric") {
|
|
|
2086
2089
|
const a = In(e, r);
|
|
2087
2090
|
!F(e) && !Array.isArray(e) && (e = [e]);
|
|
2088
2091
|
const i = r !== "string" ? _t(e, r) : lt(e, [], !0);
|
|
2089
|
-
return
|
|
2092
|
+
return f.makeTensor(i, a, r);
|
|
2090
2093
|
}
|
|
2091
2094
|
function Tn(e, t, n, s = "numeric") {
|
|
2092
2095
|
if (!Array.isArray(e))
|
|
@@ -2118,12 +2121,12 @@ function D(e) {
|
|
|
2118
2121
|
const s = e[n];
|
|
2119
2122
|
n.endsWith("_") && (n = n.substring(0, n.length - 1)), n = n + En;
|
|
2120
2123
|
const r = (...a) => {
|
|
2121
|
-
|
|
2124
|
+
f.startScope(n);
|
|
2122
2125
|
try {
|
|
2123
2126
|
const o = s(...a);
|
|
2124
|
-
return Pt(o) && console.error("Cannot return a Promise inside of tidy."),
|
|
2127
|
+
return Pt(o) && console.error("Cannot return a Promise inside of tidy."), f.endScope(o), o;
|
|
2125
2128
|
} catch (o) {
|
|
2126
|
-
throw
|
|
2129
|
+
throw f.endScope(null), o;
|
|
2127
2130
|
}
|
|
2128
2131
|
};
|
|
2129
2132
|
return Object.defineProperty(r, "name", { value: n, configurable: !0 }), r;
|
|
@@ -2152,7 +2155,7 @@ function An(e, t, n, s) {
|
|
|
2152
2155
|
if (me(e) || ge(e)) {
|
|
2153
2156
|
if (s !== "float32" && s !== "int32")
|
|
2154
2157
|
throw new Error(`Creating tensor from GPU data only supports 'float32'|'int32' dtype, while the dtype is ${s}.`);
|
|
2155
|
-
return
|
|
2158
|
+
return f.backend.createTensorFromGPUData(e, t || n, s);
|
|
2156
2159
|
}
|
|
2157
2160
|
if (!F(e) && !Array.isArray(e) && typeof e != "number" && typeof e != "boolean" && typeof e != "string")
|
|
2158
2161
|
throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");
|
|
@@ -2165,7 +2168,7 @@ function An(e, t, n, s) {
|
|
|
2165
2168
|
y(n[o] === t[o] || !c, () => `Error creating a new Tensor. Inferred shape (${n}) does not match the provided shape (${t}). `);
|
|
2166
2169
|
}
|
|
2167
2170
|
}
|
|
2168
|
-
return !F(e) && !Array.isArray(e) && (e = [e]), t = t || n, e = s !== "string" ? _t(e, s) : lt(e, [], !0),
|
|
2171
|
+
return !F(e) && !Array.isArray(e) && (e = [e]), t = t || n, e = s !== "string" ? _t(e, s) : lt(e, [], !0), f.makeTensor(e, t, s);
|
|
2169
2172
|
}
|
|
2170
2173
|
class st {
|
|
2171
2174
|
/**
|
|
@@ -2202,8 +2205,8 @@ class st {
|
|
|
2202
2205
|
const r = n - t, a = new ArrayBuffer(r), o = new Uint8Array(a);
|
|
2203
2206
|
let i = 0;
|
|
2204
2207
|
for (let c = s; c < this.shards.length; c++) {
|
|
2205
|
-
const l = this.shards[c], h = t + i - l.start, d = i, p = Math.min(n, l.end) - l.start,
|
|
2206
|
-
if (o.set(
|
|
2208
|
+
const l = this.shards[c], h = t + i - l.start, d = i, p = Math.min(n, l.end) - l.start, g = new Uint8Array(l.buffer, h, p - h);
|
|
2209
|
+
if (o.set(g, d), i += g.length, n < l.end)
|
|
2207
2210
|
break;
|
|
2208
2211
|
}
|
|
2209
2212
|
return a;
|
|
@@ -2251,32 +2254,41 @@ function vn(e, t) {
|
|
|
2251
2254
|
* limitations under the License.
|
|
2252
2255
|
* =============================================================================
|
|
2253
2256
|
*/
|
|
2254
|
-
function ei() {
|
|
2255
|
-
g.disposeVariables();
|
|
2256
|
-
}
|
|
2257
2257
|
function ni() {
|
|
2258
|
-
|
|
2258
|
+
f.disposeVariables();
|
|
2259
2259
|
}
|
|
2260
2260
|
function si() {
|
|
2261
|
-
return
|
|
2261
|
+
return f;
|
|
2262
|
+
}
|
|
2263
|
+
function ri() {
|
|
2264
|
+
return f.memory();
|
|
2262
2265
|
}
|
|
2263
2266
|
function E(e, t) {
|
|
2264
|
-
return
|
|
2267
|
+
return f.tidy(e, t);
|
|
2265
2268
|
}
|
|
2266
2269
|
function M(e) {
|
|
2267
2270
|
pe(e).forEach((n) => n.dispose());
|
|
2268
2271
|
}
|
|
2269
2272
|
function Bn(e) {
|
|
2270
|
-
return
|
|
2273
|
+
return f.keep(e);
|
|
2271
2274
|
}
|
|
2272
|
-
function
|
|
2273
|
-
return
|
|
2275
|
+
function ai(e) {
|
|
2276
|
+
return f.setBackend(e);
|
|
2274
2277
|
}
|
|
2275
|
-
function
|
|
2276
|
-
return
|
|
2278
|
+
function oi() {
|
|
2279
|
+
return f.ready();
|
|
2280
|
+
}
|
|
2281
|
+
function ii() {
|
|
2282
|
+
return f.backendName;
|
|
2283
|
+
}
|
|
2284
|
+
function ci(e, t, n = 1) {
|
|
2285
|
+
return f.registerBackend(e, t, n);
|
|
2286
|
+
}
|
|
2287
|
+
function li() {
|
|
2288
|
+
return f.backend;
|
|
2277
2289
|
}
|
|
2278
2290
|
const Jt = 4;
|
|
2279
|
-
async function
|
|
2291
|
+
async function ui(e, t) {
|
|
2280
2292
|
const n = [], s = [], r = Array.isArray(e) ? e.map((o) => o.name) : Object.keys(e);
|
|
2281
2293
|
for (let o = 0; o < r.length; ++o) {
|
|
2282
2294
|
const i = r[o], c = Array.isArray(e) ? e[o].tensor : e[i];
|
|
@@ -2286,10 +2298,10 @@ async function oi(e, t) {
|
|
|
2286
2298
|
if (c.dtype === "string") {
|
|
2287
2299
|
const u = new Promise(async (h) => {
|
|
2288
2300
|
const d = await c.bytes(), m = d.reduce((w, I) => w + I.length, 0) + Jt * d.length, p = new Uint8Array(m);
|
|
2289
|
-
let
|
|
2301
|
+
let g = 0;
|
|
2290
2302
|
for (let w = 0; w < d.length; w++) {
|
|
2291
2303
|
const I = d[w], _ = new Uint8Array(new Uint32Array([I.length]).buffer);
|
|
2292
|
-
p.set(_,
|
|
2304
|
+
p.set(_, g), g += Jt, p.set(I, g), g += I.length;
|
|
2293
2305
|
}
|
|
2294
2306
|
h(p);
|
|
2295
2307
|
});
|
|
@@ -2339,10 +2351,10 @@ function Fn(e) {
|
|
|
2339
2351
|
n.set([t.charCodeAt(s)], s);
|
|
2340
2352
|
return n.buffer;
|
|
2341
2353
|
}
|
|
2342
|
-
function
|
|
2354
|
+
function hi(e) {
|
|
2343
2355
|
return st.join(e);
|
|
2344
2356
|
}
|
|
2345
|
-
function
|
|
2357
|
+
function di(e, t) {
|
|
2346
2358
|
const n = {
|
|
2347
2359
|
modelTopology: e.modelTopology,
|
|
2348
2360
|
format: e.format,
|
|
@@ -2368,7 +2380,7 @@ function Rn(e, t, n) {
|
|
|
2368
2380
|
}
|
|
2369
2381
|
return e.signature != null && (s.signature = e.signature), e.userDefinedMetadata != null && (s.userDefinedMetadata = e.userDefinedMetadata), e.modelInitializer != null && (s.modelInitializer = e.modelInitializer), e.initializerSignature != null && (s.initializerSignature = e.initializerSignature), s;
|
|
2370
2382
|
}
|
|
2371
|
-
async function
|
|
2383
|
+
async function fi(e, t) {
|
|
2372
2384
|
let n, s;
|
|
2373
2385
|
return e.weightsManifest != null && ([n, s] = await t(e.weightsManifest)), Rn(e, n, s);
|
|
2374
2386
|
}
|
|
@@ -2383,7 +2395,7 @@ function Se(e) {
|
|
|
2383
2395
|
weightDataBytes: e.weightData == null ? 0 : new st(e.weightData).byteLength
|
|
2384
2396
|
};
|
|
2385
2397
|
}
|
|
2386
|
-
function
|
|
2398
|
+
function gi(e) {
|
|
2387
2399
|
const t = [];
|
|
2388
2400
|
for (const n of e)
|
|
2389
2401
|
t.push(...n.weights);
|
|
@@ -2460,7 +2472,7 @@ class A {
|
|
|
2460
2472
|
}), r;
|
|
2461
2473
|
}
|
|
2462
2474
|
}
|
|
2463
|
-
const
|
|
2475
|
+
const mi = (e) => A.getSaveHandlers(e);
|
|
2464
2476
|
/**
|
|
2465
2477
|
* @license
|
|
2466
2478
|
* Copyright 2018 Google LLC. All Rights Reserved.
|
|
@@ -2555,8 +2567,8 @@ class W {
|
|
|
2555
2567
|
}
|
|
2556
2568
|
m.onsuccess = () => s({ modelArtifactsInfo: i }), m.onerror = (p) => {
|
|
2557
2569
|
l = c.objectStore(L);
|
|
2558
|
-
const
|
|
2559
|
-
|
|
2570
|
+
const g = l.delete(this.modelPath);
|
|
2571
|
+
g.onsuccess = () => (o.close(), r(m.error)), g.onerror = (w) => (o.close(), r(m.error));
|
|
2560
2572
|
};
|
|
2561
2573
|
}, u.onerror = (d) => (o.close(), r(u.error)), c.oncomplete = () => {
|
|
2562
2574
|
h == null ? o.close() : h.oncomplete = () => o.close();
|
|
@@ -2945,7 +2957,7 @@ function Kn(e, t) {
|
|
|
2945
2957
|
if (t === "string" && n.dtype !== "string" || t !== "string" && n.dtype === "string")
|
|
2946
2958
|
throw new Error("Only strings can be casted to strings");
|
|
2947
2959
|
const s = { x: n }, r = { dtype: t };
|
|
2948
|
-
return
|
|
2960
|
+
return f.runKernel(oe, s, r);
|
|
2949
2961
|
}
|
|
2950
2962
|
const Rt = /* @__PURE__ */ D({ cast_: Kn });
|
|
2951
2963
|
/**
|
|
@@ -2966,7 +2978,7 @@ const Rt = /* @__PURE__ */ D({ cast_: Kn });
|
|
|
2966
2978
|
*/
|
|
2967
2979
|
function Hn(e) {
|
|
2968
2980
|
const n = { x: T(e, "x", "clone", "string_or_numeric") };
|
|
2969
|
-
return
|
|
2981
|
+
return f.runKernel(ie, n);
|
|
2970
2982
|
}
|
|
2971
2983
|
const Xn = /* @__PURE__ */ D({ clone_: Hn });
|
|
2972
2984
|
/**
|
|
@@ -3032,7 +3044,7 @@ function Zn(e, t) {
|
|
|
3032
3044
|
let n = T(e, "a", "add"), s = T(t, "b", "add");
|
|
3033
3045
|
[n, s] = K(n, s);
|
|
3034
3046
|
const r = { a: n, b: s };
|
|
3035
|
-
return
|
|
3047
|
+
return f.runKernel(ae, r);
|
|
3036
3048
|
}
|
|
3037
3049
|
const k = /* @__PURE__ */ D({ add_: Zn });
|
|
3038
3050
|
/**
|
|
@@ -3055,7 +3067,7 @@ function Qn(e, t) {
|
|
|
3055
3067
|
let n = T(e, "a", "floorDiv"), s = T(t, "b", "floorDiv");
|
|
3056
3068
|
[n, s] = K(n, s);
|
|
3057
3069
|
const r = { a: n, b: s };
|
|
3058
|
-
return
|
|
3070
|
+
return f.runKernel(Ye, r);
|
|
3059
3071
|
}
|
|
3060
3072
|
const ts = /* @__PURE__ */ D({ floorDiv_: Qn });
|
|
3061
3073
|
/**
|
|
@@ -3079,7 +3091,7 @@ function es(e, t) {
|
|
|
3079
3091
|
if ([n, s] = K(n, s), n.dtype === "int32" && s.dtype === "int32")
|
|
3080
3092
|
return ts(n, s);
|
|
3081
3093
|
const r = { a: n, b: s }, a = {};
|
|
3082
|
-
return
|
|
3094
|
+
return f.runKernel(Xe, r, a);
|
|
3083
3095
|
}
|
|
3084
3096
|
const $ = /* @__PURE__ */ D({ div_: es });
|
|
3085
3097
|
/**
|
|
@@ -3102,7 +3114,7 @@ function ns(e, t) {
|
|
|
3102
3114
|
let n = T(e, "a", "mul"), s = T(t, "b", "mul");
|
|
3103
3115
|
[n, s] = K(n, s);
|
|
3104
3116
|
const r = { a: n, b: s };
|
|
3105
|
-
return
|
|
3117
|
+
return f.runKernel(Qe, r);
|
|
3106
3118
|
}
|
|
3107
3119
|
const b = /* @__PURE__ */ D({ mul_: ns });
|
|
3108
3120
|
/**
|
|
@@ -3125,10 +3137,10 @@ function ss(e) {
|
|
|
3125
3137
|
const t = T(e, "x", "abs");
|
|
3126
3138
|
if (t.dtype === "complex64") {
|
|
3127
3139
|
const n = { x: t };
|
|
3128
|
-
return
|
|
3140
|
+
return f.runKernel(He, n);
|
|
3129
3141
|
} else {
|
|
3130
3142
|
const n = { x: t };
|
|
3131
|
-
return
|
|
3143
|
+
return f.runKernel(Ke, n);
|
|
3132
3144
|
}
|
|
3133
3145
|
}
|
|
3134
3146
|
const rs = /* @__PURE__ */ D({ abs_: ss });
|
|
@@ -3151,7 +3163,7 @@ const rs = /* @__PURE__ */ D({ abs_: ss });
|
|
|
3151
3163
|
function as(e, t, n) {
|
|
3152
3164
|
Ct(e), n = n || yt(t);
|
|
3153
3165
|
const s = { shape: e, value: t, dtype: n };
|
|
3154
|
-
return
|
|
3166
|
+
return f.runKernel(Je, {}, s);
|
|
3155
3167
|
}
|
|
3156
3168
|
/**
|
|
3157
3169
|
* @license
|
|
@@ -3169,7 +3181,7 @@ function as(e, t, n) {
|
|
|
3169
3181
|
* limitations under the License.
|
|
3170
3182
|
* =============================================================================
|
|
3171
3183
|
*/
|
|
3172
|
-
function
|
|
3184
|
+
function pi(e, t) {
|
|
3173
3185
|
const n = e.length, s = [];
|
|
3174
3186
|
for (let r = 0; r < n; r++) {
|
|
3175
3187
|
const a = n - 1 - r, o = e[a] || 1;
|
|
@@ -3177,7 +3189,7 @@ function di(e, t) {
|
|
|
3177
3189
|
}
|
|
3178
3190
|
return s;
|
|
3179
3191
|
}
|
|
3180
|
-
function
|
|
3192
|
+
function yi(e, t) {
|
|
3181
3193
|
const n = [];
|
|
3182
3194
|
for (let s = 0; s < t.length; s++) {
|
|
3183
3195
|
const r = e[e.length - s - 1], a = t.length - s - 1, o = t[a];
|
|
@@ -3221,7 +3233,7 @@ function os(e, t) {
|
|
|
3221
3233
|
*/
|
|
3222
3234
|
function is(e) {
|
|
3223
3235
|
const n = { x: T(e, "x", "zerosLike") };
|
|
3224
|
-
return
|
|
3236
|
+
return f.runKernel(sn, n);
|
|
3225
3237
|
}
|
|
3226
3238
|
const C = /* @__PURE__ */ D({ zerosLike_: is });
|
|
3227
3239
|
/**
|
|
@@ -3244,7 +3256,7 @@ function cs(e, t) {
|
|
|
3244
3256
|
let n = T(e, "base", "pow"), s = T(t, "exp", "pow");
|
|
3245
3257
|
[n, s] = K(n, s);
|
|
3246
3258
|
const r = { a: n, b: s };
|
|
3247
|
-
return
|
|
3259
|
+
return f.runKernel(tn, r);
|
|
3248
3260
|
}
|
|
3249
3261
|
const Qt = /* @__PURE__ */ D({ pow_: cs });
|
|
3250
3262
|
/**
|
|
@@ -3288,7 +3300,7 @@ function q(e, t) {
|
|
|
3288
3300
|
*/
|
|
3289
3301
|
function ls(e) {
|
|
3290
3302
|
const n = { x: T(e, "x", "sqrt", "float32") };
|
|
3291
|
-
return
|
|
3303
|
+
return f.runKernel(en, n);
|
|
3292
3304
|
}
|
|
3293
3305
|
const nt = /* @__PURE__ */ D({ sqrt_: ls });
|
|
3294
3306
|
/**
|
|
@@ -3309,7 +3321,7 @@ const nt = /* @__PURE__ */ D({ sqrt_: ls });
|
|
|
3309
3321
|
*/
|
|
3310
3322
|
function us(e) {
|
|
3311
3323
|
const t = T(e, "x", "square"), n = {};
|
|
3312
|
-
return
|
|
3324
|
+
return f.runKernel("Square", { x: t }, n);
|
|
3313
3325
|
}
|
|
3314
3326
|
const V = /* @__PURE__ */ D({ square_: us });
|
|
3315
3327
|
/**
|
|
@@ -3328,12 +3340,12 @@ const V = /* @__PURE__ */ D({ square_: us });
|
|
|
3328
3340
|
* limitations under the License.
|
|
3329
3341
|
* =============================================================================
|
|
3330
3342
|
*/
|
|
3331
|
-
function
|
|
3343
|
+
function bi(e) {
|
|
3332
3344
|
return y(dt(e), () => "The f passed in grads(f) must be a function"), (t, n) => {
|
|
3333
3345
|
y(Array.isArray(t), () => "The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s");
|
|
3334
3346
|
const s = Tn(t, "args", "tf.grads", "string_or_numeric"), r = n != null ? T(n, "dy", "tf.grads") : null;
|
|
3335
|
-
return
|
|
3336
|
-
const { value: a, grads: o } =
|
|
3347
|
+
return f.tidy(() => {
|
|
3348
|
+
const { value: a, grads: o } = f.gradients(() => e(...s), s, r);
|
|
3337
3349
|
return r != null && xe(a.shape, r.shape, "The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"), ds(o), o;
|
|
3338
3350
|
});
|
|
3339
3351
|
};
|
|
@@ -3343,20 +3355,20 @@ function hs(e, t) {
|
|
|
3343
3355
|
const n = t != null;
|
|
3344
3356
|
if (!n) {
|
|
3345
3357
|
t = [];
|
|
3346
|
-
for (const l in
|
|
3347
|
-
t.push(
|
|
3358
|
+
for (const l in f.registeredVariables)
|
|
3359
|
+
t.push(f.registeredVariables[l]);
|
|
3348
3360
|
}
|
|
3349
3361
|
const s = n ? t.filter((l) => !l.trainable) : null, r = t.length;
|
|
3350
3362
|
t = t.filter((l) => l.trainable), y(t.length > 0, () => `variableGrads() expects at least one of the input variables to be trainable, but none of the ${r} variables is trainable.`);
|
|
3351
|
-
const a = !0, { value: o, grads: i } =
|
|
3363
|
+
const a = !0, { value: o, grads: i } = f.gradients(e, t, null, a);
|
|
3352
3364
|
y(i.some((l) => l != null), () => "Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."), y(o.rank === 0, () => `The f passed in variableGrads(f) must return a scalar, but it returned a rank-${o.rank} tensor`);
|
|
3353
3365
|
const c = {};
|
|
3354
3366
|
return t.forEach((l, u) => {
|
|
3355
3367
|
i[u] != null && (c[l.name] = i[u]);
|
|
3356
3368
|
}), s?.forEach((l) => c[l.name] = null), { value: o, grads: c };
|
|
3357
3369
|
}
|
|
3358
|
-
function
|
|
3359
|
-
return
|
|
3370
|
+
function wi(e) {
|
|
3371
|
+
return f.customGrad(e);
|
|
3360
3372
|
}
|
|
3361
3373
|
function ds(e) {
|
|
3362
3374
|
if (e.filter((n) => n == null).length > 0)
|
|
@@ -3383,7 +3395,7 @@ function fs(e, t) {
|
|
|
3383
3395
|
let n = T(e, "a", "sub"), s = T(t, "b", "sub");
|
|
3384
3396
|
[n, s] = K(n, s);
|
|
3385
3397
|
const r = { a: n, b: s };
|
|
3386
|
-
return
|
|
3398
|
+
return f.runKernel(nn, r);
|
|
3387
3399
|
}
|
|
3388
3400
|
const tt = /* @__PURE__ */ D({ sub_: fs });
|
|
3389
3401
|
/**
|
|
@@ -3406,7 +3418,7 @@ function gs(e, t) {
|
|
|
3406
3418
|
let n = T(e, "a", "maximum"), s = T(t, "b", "maximum");
|
|
3407
3419
|
[n, s] = K(n, s), n.dtype === "bool" && (n = Rt(n, "int32"), s = Rt(s, "int32")), os(n.shape, s.shape);
|
|
3408
3420
|
const r = { a: n, b: s };
|
|
3409
|
-
return
|
|
3421
|
+
return f.runKernel(Ze, r);
|
|
3410
3422
|
}
|
|
3411
3423
|
const ms = /* @__PURE__ */ D({ maximum_: gs });
|
|
3412
3424
|
/**
|
|
@@ -3596,11 +3608,11 @@ class Ss extends H {
|
|
|
3596
3608
|
return "Adadelta";
|
|
3597
3609
|
}
|
|
3598
3610
|
constructor(t, n, s = null) {
|
|
3599
|
-
super(), this.learningRate = t, this.rho = n, this.epsilon = s, this.accumulatedGrads = [], this.accumulatedUpdates = [], s == null && (this.epsilon =
|
|
3611
|
+
super(), this.learningRate = t, this.rho = n, this.epsilon = s, this.accumulatedGrads = [], this.accumulatedUpdates = [], s == null && (this.epsilon = f.backend.epsilon());
|
|
3600
3612
|
}
|
|
3601
3613
|
applyGradients(t) {
|
|
3602
3614
|
(Array.isArray(t) ? t.map((s) => s.name) : Object.keys(t)).forEach((s, r) => {
|
|
3603
|
-
const a =
|
|
3615
|
+
const a = f.registeredVariables[s], o = !1;
|
|
3604
3616
|
this.accumulatedGrads[r] == null && (this.accumulatedGrads[r] = {
|
|
3605
3617
|
originalName: `${s}/accum_grad`,
|
|
3606
3618
|
variable: E(() => C(a).variable(o))
|
|
@@ -3676,7 +3688,7 @@ class ks extends H {
|
|
|
3676
3688
|
}
|
|
3677
3689
|
applyGradients(t) {
|
|
3678
3690
|
(Array.isArray(t) ? t.map((s) => s.name) : Object.keys(t)).forEach((s, r) => {
|
|
3679
|
-
const a =
|
|
3691
|
+
const a = f.registeredVariables[s];
|
|
3680
3692
|
this.accumulatedGrads[r] == null && (this.accumulatedGrads[r] = {
|
|
3681
3693
|
originalName: `${s}/accumulator`,
|
|
3682
3694
|
variable: E(() => as(a.shape, this.initialAccumulatorValue).variable(!1))
|
|
@@ -3688,7 +3700,7 @@ class ks extends H {
|
|
|
3688
3700
|
E(() => {
|
|
3689
3701
|
const c = k(i, V(o));
|
|
3690
3702
|
i.assign(c);
|
|
3691
|
-
const l = k(b($(o, nt(k(c,
|
|
3703
|
+
const l = k(b($(o, nt(k(c, f.backend.epsilon()))), -this.learningRate), a);
|
|
3692
3704
|
a.assign(l);
|
|
3693
3705
|
});
|
|
3694
3706
|
}), this.incrementIterations();
|
|
@@ -3739,14 +3751,14 @@ class Is extends H {
|
|
|
3739
3751
|
constructor(t, n, s, r = null) {
|
|
3740
3752
|
super(), this.learningRate = t, this.beta1 = n, this.beta2 = s, this.epsilon = r, this.accumulatedFirstMoment = [], this.accumulatedSecondMoment = [], E(() => {
|
|
3741
3753
|
this.accBeta1 = q(n).variable(), this.accBeta2 = q(s).variable();
|
|
3742
|
-
}), r == null && (this.epsilon =
|
|
3754
|
+
}), r == null && (this.epsilon = f.backend.epsilon());
|
|
3743
3755
|
}
|
|
3744
3756
|
applyGradients(t) {
|
|
3745
3757
|
const n = Array.isArray(t) ? t.map((s) => s.name) : Object.keys(t);
|
|
3746
3758
|
E(() => {
|
|
3747
3759
|
const s = tt(1, this.accBeta1), r = tt(1, this.accBeta2);
|
|
3748
3760
|
n.forEach((a, o) => {
|
|
3749
|
-
const i =
|
|
3761
|
+
const i = f.registeredVariables[a], c = !1;
|
|
3750
3762
|
this.accumulatedFirstMoment[o] == null && (this.accumulatedFirstMoment[o] = {
|
|
3751
3763
|
originalName: `${a}/m`,
|
|
3752
3764
|
variable: E(() => C(i).variable(c))
|
|
@@ -3757,9 +3769,9 @@ class Is extends H {
|
|
|
3757
3769
|
const l = Array.isArray(t) ? t[o].tensor : t[a];
|
|
3758
3770
|
if (l == null)
|
|
3759
3771
|
return;
|
|
3760
|
-
const u = this.accumulatedFirstMoment[o].variable, h = this.accumulatedSecondMoment[o].variable, d = k(b(u, this.beta1), b(l, 1 - this.beta1)), m = k(b(h, this.beta2), b(V(l), 1 - this.beta2)), p = $(d, s),
|
|
3772
|
+
const u = this.accumulatedFirstMoment[o].variable, h = this.accumulatedSecondMoment[o].variable, d = k(b(u, this.beta1), b(l, 1 - this.beta1)), m = k(b(h, this.beta2), b(V(l), 1 - this.beta2)), p = $(d, s), g = $(m, r);
|
|
3761
3773
|
u.assign(d), h.assign(m);
|
|
3762
|
-
const w = k(b($(p, k(nt(
|
|
3774
|
+
const w = k(b($(p, k(nt(g), this.epsilon)), -this.learningRate), i);
|
|
3763
3775
|
i.assign(w);
|
|
3764
3776
|
}), this.accBeta1.assign(b(this.accBeta1, this.beta1)), this.accBeta2.assign(b(this.accBeta2, this.beta2));
|
|
3765
3777
|
}), this.incrementIterations();
|
|
@@ -3821,14 +3833,14 @@ class Ts extends H {
|
|
|
3821
3833
|
constructor(t, n, s, r = null, a = 0) {
|
|
3822
3834
|
super(), this.learningRate = t, this.beta1 = n, this.beta2 = s, this.epsilon = r, this.decay = a, this.accumulatedFirstMoment = [], this.accumulatedWeightedInfNorm = [], E(() => {
|
|
3823
3835
|
this.iteration = q(0).variable(), this.accBeta1 = q(n).variable();
|
|
3824
|
-
}), r == null && (this.epsilon =
|
|
3836
|
+
}), r == null && (this.epsilon = f.backend.epsilon());
|
|
3825
3837
|
}
|
|
3826
3838
|
applyGradients(t) {
|
|
3827
3839
|
const n = Array.isArray(t) ? t.map((s) => s.name) : Object.keys(t);
|
|
3828
3840
|
E(() => {
|
|
3829
3841
|
const s = tt(1, this.accBeta1), r = $(-this.learningRate, k(b(this.iteration, this.decay), 1));
|
|
3830
3842
|
n.forEach((a, o) => {
|
|
3831
|
-
const i =
|
|
3843
|
+
const i = f.registeredVariables[a], c = !1;
|
|
3832
3844
|
this.accumulatedFirstMoment[o] == null && (this.accumulatedFirstMoment[o] = {
|
|
3833
3845
|
originalName: `${a}/m`,
|
|
3834
3846
|
variable: C(i).variable(c)
|
|
@@ -3839,9 +3851,9 @@ class Ts extends H {
|
|
|
3839
3851
|
const l = Array.isArray(t) ? t[o].tensor : t[a];
|
|
3840
3852
|
if (l == null)
|
|
3841
3853
|
return;
|
|
3842
|
-
const u = this.accumulatedFirstMoment[o].variable, h = this.accumulatedWeightedInfNorm[o].variable, d = k(b(u, this.beta1), b(l, 1 - this.beta1)), m = b(h, this.beta2), p = rs(l),
|
|
3843
|
-
u.assign(d), h.assign(
|
|
3844
|
-
const w = k(b($(r, s), $(d, k(
|
|
3854
|
+
const u = this.accumulatedFirstMoment[o].variable, h = this.accumulatedWeightedInfNorm[o].variable, d = k(b(u, this.beta1), b(l, 1 - this.beta1)), m = b(h, this.beta2), p = rs(l), g = ms(m, p);
|
|
3855
|
+
u.assign(d), h.assign(g);
|
|
3856
|
+
const w = k(b($(r, s), $(d, k(g, this.epsilon))), i);
|
|
3845
3857
|
i.assign(w);
|
|
3846
3858
|
}), this.iteration.assign(k(this.iteration, 1)), this.accBeta1.assign(b(this.accBeta1, this.beta1));
|
|
3847
3859
|
}), this.incrementIterations();
|
|
@@ -3898,7 +3910,7 @@ class Be extends H {
|
|
|
3898
3910
|
const a = Array.isArray(t) ? t[r].tensor : t[s];
|
|
3899
3911
|
if (a == null)
|
|
3900
3912
|
return;
|
|
3901
|
-
const o =
|
|
3913
|
+
const o = f.registeredVariables[s];
|
|
3902
3914
|
E(() => {
|
|
3903
3915
|
const i = k(b(this.c, a), o);
|
|
3904
3916
|
o.assign(i);
|
|
@@ -3956,7 +3968,7 @@ class Es extends Be {
|
|
|
3956
3968
|
}
|
|
3957
3969
|
applyGradients(t) {
|
|
3958
3970
|
(Array.isArray(t) ? t.map((s) => s.name) : Object.keys(t)).forEach((s, r) => {
|
|
3959
|
-
const a =
|
|
3971
|
+
const a = f.registeredVariables[s];
|
|
3960
3972
|
this.accumulations[r] == null && (this.accumulations[r] = {
|
|
3961
3973
|
originalName: `${s}/momentum`,
|
|
3962
3974
|
variable: E(() => C(a).variable(!1))
|
|
@@ -4022,12 +4034,12 @@ class As extends H {
|
|
|
4022
4034
|
return "RMSProp";
|
|
4023
4035
|
}
|
|
4024
4036
|
constructor(t, n = 0.9, s = 0, r = null, a = !1) {
|
|
4025
|
-
if (super(), this.learningRate = t, this.decay = n, this.momentum = s, this.epsilon = r, this.accumulatedMeanSquares = [], this.accumulatedMoments = [], this.accumulatedMeanGrads = [], this.centered = a, r == null && (this.epsilon =
|
|
4037
|
+
if (super(), this.learningRate = t, this.decay = n, this.momentum = s, this.epsilon = r, this.accumulatedMeanSquares = [], this.accumulatedMoments = [], this.accumulatedMeanGrads = [], this.centered = a, r == null && (this.epsilon = f.backend.epsilon()), t == null)
|
|
4026
4038
|
throw new Error("learningRate for RMSPropOptimizer must be defined.");
|
|
4027
4039
|
}
|
|
4028
4040
|
applyGradients(t) {
|
|
4029
4041
|
(Array.isArray(t) ? t.map((s) => s.name) : Object.keys(t)).forEach((s, r) => {
|
|
4030
|
-
const a =
|
|
4042
|
+
const a = f.registeredVariables[s], o = !1;
|
|
4031
4043
|
this.accumulatedMeanSquares[r] == null && (this.accumulatedMeanSquares[r] = {
|
|
4032
4044
|
originalName: `${s}/rms`,
|
|
4033
4045
|
variable: E(() => C(a).variable(o))
|
|
@@ -4047,8 +4059,8 @@ class As extends H {
|
|
|
4047
4059
|
if (this.centered) {
|
|
4048
4060
|
const h = this.accumulatedMeanGrads[r].variable, d = k(b(h, this.decay), b(i, 1 - this.decay)), m = $(b(i, this.learningRate), nt(tt(u, k(V(d), this.epsilon)))), p = k(b(l, this.momentum), m);
|
|
4049
4061
|
c.assign(u), h.assign(d), l.assign(p);
|
|
4050
|
-
const
|
|
4051
|
-
a.assign(
|
|
4062
|
+
const g = tt(a, p);
|
|
4063
|
+
a.assign(g);
|
|
4052
4064
|
} else {
|
|
4053
4065
|
const h = k(b(c, this.decay), b(V(i), 1 - this.decay)), d = k(b(l, this.momentum), $(b(i, this.learningRate), nt(k(h, this.epsilon))));
|
|
4054
4066
|
c.assign(h), l.assign(d);
|
|
@@ -4140,293 +4152,297 @@ function Bs() {
|
|
|
4140
4152
|
*/
|
|
4141
4153
|
Bs();
|
|
4142
4154
|
export {
|
|
4143
|
-
|
|
4155
|
+
ea as $,
|
|
4144
4156
|
Is as A,
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4157
|
+
Tn as B,
|
|
4158
|
+
Ct as C,
|
|
4159
|
+
Ge as D,
|
|
4160
|
+
f as E,
|
|
4161
|
+
K as F,
|
|
4162
|
+
ta as G,
|
|
4163
|
+
hr as H,
|
|
4164
|
+
Ya as I,
|
|
4165
|
+
So as J,
|
|
4166
|
+
Xn as K,
|
|
4167
|
+
Po as L,
|
|
4168
|
+
Sr as M,
|
|
4169
|
+
ka as N,
|
|
4170
|
+
Xa as O,
|
|
4171
|
+
Ga as P,
|
|
4172
|
+
Rt as Q,
|
|
4173
|
+
Ka as R,
|
|
4174
|
+
ko as S,
|
|
4163
4175
|
x as T,
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4176
|
+
bo as U,
|
|
4177
|
+
In as V,
|
|
4178
|
+
An as W,
|
|
4179
|
+
Ps as X,
|
|
4180
|
+
ni as Y,
|
|
4181
|
+
$t as Z,
|
|
4182
|
+
oo as _,
|
|
4171
4183
|
b as a,
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
+
Na as a$,
|
|
4185
|
+
xe as a0,
|
|
4186
|
+
wr as a1,
|
|
4187
|
+
ne as a2,
|
|
4188
|
+
Br as a3,
|
|
4189
|
+
fo as a4,
|
|
4190
|
+
xa as a5,
|
|
4191
|
+
k as a6,
|
|
4192
|
+
Kr as a7,
|
|
4193
|
+
fa as a8,
|
|
4194
|
+
Gs as a9,
|
|
4195
|
+
di as aA,
|
|
4184
4196
|
Se as aB,
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4197
|
+
fi as aC,
|
|
4198
|
+
gi as aD,
|
|
4199
|
+
Us as aE,
|
|
4200
|
+
_s as aF,
|
|
4201
|
+
$s as aG,
|
|
4202
|
+
ut as aH,
|
|
4203
|
+
Ws as aI,
|
|
4204
|
+
jt as aJ,
|
|
4205
|
+
ue as aK,
|
|
4206
|
+
Xo as aL,
|
|
4207
|
+
O as aM,
|
|
4208
|
+
ho as aN,
|
|
4209
|
+
fr as aO,
|
|
4210
|
+
lo as aP,
|
|
4211
|
+
zr as aQ,
|
|
4212
|
+
Ma as aR,
|
|
4213
|
+
rs as aS,
|
|
4214
|
+
nt as aT,
|
|
4215
|
+
V as aU,
|
|
4216
|
+
Hr as aV,
|
|
4217
|
+
na as aW,
|
|
4218
|
+
sa as aX,
|
|
4219
|
+
aa as aY,
|
|
4220
|
+
ua as aZ,
|
|
4221
|
+
ha as a_,
|
|
4222
|
+
pi as aa,
|
|
4223
|
+
xt as ab,
|
|
4212
4224
|
S as ac,
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4225
|
+
F as ad,
|
|
4226
|
+
pe as ae,
|
|
4227
|
+
ti as af,
|
|
4228
|
+
gt as ag,
|
|
4229
|
+
Zr as ah,
|
|
4230
|
+
qn as ai,
|
|
4219
4231
|
$ as aj,
|
|
4220
4232
|
ie as ak,
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4233
|
+
la as al,
|
|
4234
|
+
Zo as am,
|
|
4235
|
+
za as an,
|
|
4224
4236
|
Ne as ao,
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4237
|
+
po as ap,
|
|
4238
|
+
Vr as aq,
|
|
4239
|
+
Ja as ar,
|
|
4240
|
+
no as as,
|
|
4241
|
+
Vo as at,
|
|
4242
|
+
yi as au,
|
|
4231
4243
|
Ns as av,
|
|
4232
|
-
|
|
4244
|
+
Qo as aw,
|
|
4233
4245
|
Xe as ax,
|
|
4234
4246
|
A as ay,
|
|
4235
4247
|
st as az,
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4248
|
+
q as b,
|
|
4249
|
+
Ea as b$,
|
|
4250
|
+
ma as b0,
|
|
4251
|
+
Da as b1,
|
|
4252
|
+
Ha as b2,
|
|
4253
|
+
ro as b3,
|
|
4254
|
+
Uo as b4,
|
|
4255
|
+
Oo as b5,
|
|
4256
|
+
Rr as b6,
|
|
4257
|
+
Yr as b7,
|
|
4258
|
+
jo as b8,
|
|
4259
|
+
Ca as b9,
|
|
4260
|
+
Bo as bA,
|
|
4261
|
+
Do as bB,
|
|
4262
|
+
nn as bC,
|
|
4263
|
+
Re as bD,
|
|
4264
|
+
Zs as bE,
|
|
4265
|
+
Qs as bF,
|
|
4266
|
+
tr as bG,
|
|
4267
|
+
ir as bH,
|
|
4268
|
+
lr as bI,
|
|
4269
|
+
Co as bJ,
|
|
4270
|
+
dr as bK,
|
|
4271
|
+
Qr as bL,
|
|
4272
|
+
br as bM,
|
|
4273
|
+
kr as bN,
|
|
4274
|
+
Tr as bO,
|
|
4275
|
+
Er as bP,
|
|
4276
|
+
vr as bQ,
|
|
4277
|
+
Mr as bR,
|
|
4278
|
+
Dr as bS,
|
|
4279
|
+
Fr as bT,
|
|
4280
|
+
xr as bU,
|
|
4281
|
+
$r as bV,
|
|
4282
|
+
jr as bW,
|
|
4283
|
+
ga as bX,
|
|
4284
|
+
yo as bY,
|
|
4285
|
+
pa as bZ,
|
|
4286
|
+
Ia as b_,
|
|
4287
|
+
La as ba,
|
|
4288
|
+
Pa as bb,
|
|
4289
|
+
to as bc,
|
|
4290
|
+
Za as bd,
|
|
4291
|
+
_o as be,
|
|
4292
|
+
Ke as bf,
|
|
4293
|
+
zs as bg,
|
|
4294
|
+
Hs as bh,
|
|
4295
|
+
Ks as bi,
|
|
4296
|
+
oe as bj,
|
|
4297
|
+
Vs as bk,
|
|
4298
|
+
_t as bl,
|
|
4299
|
+
ae as bm,
|
|
4300
|
+
gr as bn,
|
|
4301
|
+
te as bo,
|
|
4302
|
+
yr as bp,
|
|
4303
|
+
qr as bq,
|
|
4304
|
+
Xr as br,
|
|
4305
|
+
Ye as bs,
|
|
4306
|
+
Ze as bt,
|
|
4307
|
+
Qe as bu,
|
|
4308
|
+
$a as bv,
|
|
4309
|
+
Va as bw,
|
|
4310
|
+
ao as bx,
|
|
4311
|
+
fn as by,
|
|
4312
|
+
en as bz,
|
|
4313
|
+
tt as c,
|
|
4314
|
+
mi as c$,
|
|
4315
|
+
Ba as c0,
|
|
4316
|
+
Oa as c1,
|
|
4317
|
+
_a as c2,
|
|
4318
|
+
Ua as c3,
|
|
4319
|
+
wo as c4,
|
|
4320
|
+
so as c5,
|
|
4321
|
+
uo as c6,
|
|
4322
|
+
go as c7,
|
|
4323
|
+
zo as c8,
|
|
4324
|
+
Ir as c9,
|
|
4325
|
+
Or as cA,
|
|
4326
|
+
Wr as cB,
|
|
4327
|
+
oa as cC,
|
|
4328
|
+
ia as cD,
|
|
4329
|
+
ca as cE,
|
|
4330
|
+
ba as cF,
|
|
4331
|
+
Sa as cG,
|
|
4332
|
+
wa as cH,
|
|
4333
|
+
Aa as cI,
|
|
4334
|
+
Ta as cJ,
|
|
4335
|
+
Fa as cK,
|
|
4336
|
+
Ra as cL,
|
|
4337
|
+
tn as cM,
|
|
4338
|
+
eo as cN,
|
|
4339
|
+
Qa as cO,
|
|
4340
|
+
mo as cP,
|
|
4341
|
+
Mo as cQ,
|
|
4342
|
+
$o as cR,
|
|
4343
|
+
ms as cS,
|
|
4344
|
+
sn as cT,
|
|
4345
|
+
li as cU,
|
|
4346
|
+
ws as cV,
|
|
4347
|
+
bs as cW,
|
|
4348
|
+
G as cX,
|
|
4349
|
+
Oe as cY,
|
|
4350
|
+
H as cZ,
|
|
4351
|
+
xs as c_,
|
|
4352
|
+
Ko as ca,
|
|
4353
|
+
Cr as cb,
|
|
4354
|
+
Pr as cc,
|
|
4355
|
+
qo as cd,
|
|
4356
|
+
Be as ce,
|
|
4357
|
+
Es as cf,
|
|
4358
|
+
As as cg,
|
|
4359
|
+
Ss as ch,
|
|
4360
|
+
Ts as ci,
|
|
4361
|
+
ks as cj,
|
|
4362
|
+
Xs as ck,
|
|
4363
|
+
Js as cl,
|
|
4364
|
+
Ys as cm,
|
|
4365
|
+
er as cn,
|
|
4366
|
+
nr as co,
|
|
4367
|
+
sr as cp,
|
|
4368
|
+
or as cq,
|
|
4369
|
+
rr as cr,
|
|
4370
|
+
ar as cs,
|
|
4371
|
+
ur as ct,
|
|
4372
|
+
cr as cu,
|
|
4373
|
+
mr as cv,
|
|
4374
|
+
He as cw,
|
|
4375
|
+
Ar as cx,
|
|
4376
|
+
_r as cy,
|
|
4377
|
+
Gr as cz,
|
|
4366
4378
|
M as d,
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4379
|
+
ui as d0,
|
|
4380
|
+
hi as d1,
|
|
4381
|
+
Fe as d2,
|
|
4382
|
+
Rs as d3,
|
|
4383
|
+
js as d4,
|
|
4384
|
+
lt as d5,
|
|
4385
|
+
Cs as d6,
|
|
4386
|
+
Nt as d7,
|
|
4387
|
+
ci as d8,
|
|
4388
|
+
Je as d9,
|
|
4389
|
+
qs as dA,
|
|
4390
|
+
Wa as dB,
|
|
4391
|
+
ja as dC,
|
|
4392
|
+
qa as dD,
|
|
4393
|
+
Io as dE,
|
|
4394
|
+
To as dF,
|
|
4395
|
+
xo as dG,
|
|
4396
|
+
No as dH,
|
|
4397
|
+
ei as dI,
|
|
4398
|
+
Os as dJ,
|
|
4399
|
+
It as dK,
|
|
4400
|
+
kn as dL,
|
|
4401
|
+
yt as da,
|
|
4402
|
+
Ls as db,
|
|
4403
|
+
pr as dc,
|
|
4404
|
+
Nr as dd,
|
|
4405
|
+
Lr as de,
|
|
4406
|
+
Ur as df,
|
|
4407
|
+
Jr as dg,
|
|
4408
|
+
Wo as dh,
|
|
4409
|
+
Ho as di,
|
|
4410
|
+
ra as dj,
|
|
4411
|
+
da as dk,
|
|
4412
|
+
ya as dl,
|
|
4413
|
+
va as dm,
|
|
4414
|
+
co as dn,
|
|
4415
|
+
Eo as dp,
|
|
4416
|
+
Ao as dq,
|
|
4417
|
+
vo as dr,
|
|
4418
|
+
Fo as ds,
|
|
4419
|
+
Ro as dt,
|
|
4420
|
+
io as du,
|
|
4421
|
+
Lo as dv,
|
|
4422
|
+
Go as dw,
|
|
4423
|
+
de as dx,
|
|
4424
|
+
ts as dy,
|
|
4425
|
+
ct as dz,
|
|
4426
|
+
si as e,
|
|
4427
|
+
Jo as f,
|
|
4428
|
+
ii as g,
|
|
4429
|
+
as as h,
|
|
4430
|
+
Yo as i,
|
|
4431
|
+
z as j,
|
|
4432
|
+
os as k,
|
|
4433
|
+
y as l,
|
|
4434
|
+
ri as m,
|
|
4435
|
+
Qt as n,
|
|
4436
|
+
Bn as o,
|
|
4421
4437
|
$e as p,
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4438
|
+
wi as q,
|
|
4439
|
+
oi as r,
|
|
4440
|
+
ai as s,
|
|
4425
4441
|
E as t,
|
|
4426
4442
|
fe as u,
|
|
4427
4443
|
hs as v,
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4444
|
+
bi as w,
|
|
4445
|
+
D as x,
|
|
4446
|
+
T as y,
|
|
4431
4447
|
C as z
|
|
4432
4448
|
};
|