@genai-fi/nanogpt 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Generator.d.ts +2 -1
- package/dist/Generator.js +44 -37
- package/dist/{RealDiv-N8TpOMYv.js → RealDiv-D_q39E3A.js} +14 -14
- package/dist/{Reshape-B-lWQRnF.js → Reshape-41YpQqEo.js} +1 -1
- package/dist/{Reshape-Bo8HzP8V.js → Reshape-Bh_jzKzV.js} +2 -2
- package/dist/TeachableLLM.js +7 -5
- package/dist/{axis_util-DubwyOhW.js → axis_util-Did9235A.js} +1 -1
- package/dist/backend.js +2 -2
- package/dist/{backend_util-BJ-_jSeK.js → backend_util-yC3YH1jo.js} +17 -17
- package/dist/{broadcast_to-BYfCp5iL.js → broadcast_to-CUvOdOT5.js} +2 -2
- package/dist/checks/appendCache.d.ts +1 -0
- package/dist/checks/appendCache.js +22 -0
- package/dist/checks/attentionMask.d.ts +1 -0
- package/dist/checks/attentionMask.js +37 -0
- package/dist/checks/check.d.ts +9 -0
- package/dist/checks/check.js +20 -0
- package/dist/checks/gelu.d.ts +1 -0
- package/dist/checks/gelu.js +18 -0
- package/dist/checks/index.d.ts +22 -0
- package/dist/checks/index.js +24 -0
- package/dist/checks/normRMS.d.ts +1 -0
- package/dist/checks/normRMS.js +16 -0
- package/dist/checks/normRMSGrad.d.ts +1 -0
- package/dist/checks/normRMSGrad.js +12 -0
- package/dist/checks/qkv.d.ts +1 -0
- package/dist/checks/qkv.js +50 -0
- package/dist/checks/rope.d.ts +1 -0
- package/dist/checks/rope.js +38 -0
- package/dist/checks/weights.d.ts +16 -0
- package/dist/checks/weights.js +29 -0
- package/dist/{concat-BmDqqFsa.js → concat-pHiVqR3L.js} +1 -1
- package/dist/{dataset-CJmEGu6D.js → dataset-DPPl-iLT.js} +7 -7
- package/dist/{dropout-sx0sjVAT.js → dropout-CcKSfOYE.js} +11 -11
- package/dist/{exports_initializers-DAKM8UO9.js → exports_initializers-DKk7-bsx.js} +1 -1
- package/dist/{gather-C1siEkdp.js → gather-CPg6ZlQA.js} +1 -1
- package/dist/{gelu-Bd3UBBxg.js → gelu-BkcmEEyD.js} +1 -1
- package/dist/{gpgpu_math-TFLxaLkw.js → gpgpu_math-D_ODOLix.js} +2 -2
- package/dist/{index-CUQrfsw_.js → index-DdmHGZjq.js} +655 -647
- package/dist/{index-BaPo_0H8.js → index-evZ57wr4.js} +10 -10
- package/dist/{kernel_funcs_utils-P9aFa232.js → kernel_funcs_utils-CDfFpUab.js} +15 -15
- package/dist/layers/BaseLayer.js +2 -2
- package/dist/layers/CausalSelfAttention.js +29 -29
- package/dist/layers/MLP.js +18 -18
- 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 +11 -11
- package/dist/layers/TransformerBlock.js +1 -1
- package/dist/loader/loadTransformers.js +1 -1
- package/dist/loader/oldZipLoad.js +9 -7
- package/dist/{log_sum_exp-C142qZqY.js → log_sum_exp-C8yFJfZz.js} +45 -24
- package/dist/main.d.ts +2 -0
- package/dist/main.js +9 -7
- package/dist/{mat_mul-DMkduNJu.js → mat_mul-Dpy2mMRu.js} +1 -1
- package/dist/{mod-uUuj4gSb.js → mod-CbibJi3D.js} +1 -1
- package/dist/models/NanoGPTV1.js +1 -1
- package/dist/models/model.js +9 -7
- package/dist/{mulmat_packed_gpu-Cm2gw-c8.js → mulmat_packed_gpu-q_Gmwyld.js} +1 -1
- package/dist/{ones-ZdgQGBCP.js → ones-BAqVh-eA.js} +2 -2
- package/dist/ops/adamAdjust.js +1 -1
- package/dist/ops/adamMoments.js +1 -1
- package/dist/ops/appendCache.js +3 -3
- package/dist/ops/attentionMask.js +1 -1
- package/dist/ops/cpu/adamAdjust.js +1 -1
- package/dist/ops/cpu/adamMoments.js +2 -2
- package/dist/ops/cpu/appendCache.js +2 -2
- package/dist/ops/cpu/attentionMask.js +5 -5
- package/dist/ops/cpu/fusedSoftmax.js +2 -2
- package/dist/ops/cpu/gatherSub.js +5 -5
- package/dist/ops/cpu/gelu.js +1 -1
- package/dist/ops/cpu/matMulGelu.js +2 -2
- package/dist/ops/cpu/matMulMul.js +1 -1
- package/dist/ops/cpu/mulDropout.js +1 -1
- package/dist/ops/cpu/normRMS.js +1 -1
- package/dist/ops/cpu/qkv.js +3 -3
- package/dist/ops/cpu/rope.js +5 -5
- package/dist/ops/cpu/scatterSub.js +13 -13
- 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 +2 -2
- package/dist/ops/grads/matMulGelu.js +1 -1
- package/dist/ops/grads/normRMS.js +1 -1
- package/dist/ops/grads/qkv.js +1 -1
- package/dist/ops/grads/rope.js +1 -1
- package/dist/ops/matMulGelu.js +1 -1
- package/dist/ops/matMulMul.js +1 -1
- package/dist/ops/mulDrop.js +1 -1
- package/dist/ops/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/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/matMulGelu.js +4 -4
- package/dist/ops/webgl/matMulMul.js +1 -1
- package/dist/ops/webgl/mulDropout.js +1 -1
- package/dist/ops/webgl/normRMS.js +2 -2
- package/dist/ops/webgl/qkv.js +1 -1
- package/dist/ops/webgl/rope.js +1 -1
- package/dist/ops/webgl/scatterSub.js +1 -1
- package/dist/ops/webgpu/adamAdjust.js +3 -3
- package/dist/ops/webgpu/adamMoments.js +3 -3
- package/dist/ops/webgpu/appendCache.js +3 -3
- package/dist/ops/webgpu/attentionMask.js +3 -3
- package/dist/ops/webgpu/gatherSub.js +3 -3
- package/dist/ops/webgpu/gelu.js +3 -3
- package/dist/ops/webgpu/normRMS.js +2 -2
- package/dist/ops/webgpu/normRMSGrad.js +5 -5
- package/dist/ops/webgpu/qkv.js +3 -3
- package/dist/ops/webgpu/rope.js +3 -3
- package/dist/ops/webgpu/scatterSub.js +3 -3
- package/dist/ops/webgpu/utils/reductions.js +4 -4
- package/dist/ops-542ai2vG.js +1525 -0
- package/dist/{random_width-D8Pwy_na.js → random_width-DKGeiFuR.js} +1514 -1581
- package/dist/{range-LVHrSLdi.js → range-BcUvLuf5.js} +1 -1
- package/dist/{reciprocal-CaR9e67G.js → reciprocal-DhDWSKiD.js} +1 -1
- package/dist/{register_all_kernels-DUshvVWP.js → register_all_kernels-Do9VvZmo.js} +2312 -2335
- package/dist/{max-B3JOcNGb.js → relu-B1AXs7p5.js} +6 -6
- package/dist/{reshape-DEfQGSin.js → reshape-WeJkT3ja.js} +1 -1
- package/dist/{scatter_nd_util-CUPPNLaA.js → scatter_nd_util-B7yDhiQr.js} +1 -1
- package/dist/{selu_util-8vv5JxQV.js → selu_util-BgUO9gHY.js} +125 -146
- package/dist/{shared-D1elLckx.js → shared-CZiWmQCI.js} +1 -1
- package/dist/{shared-CkNorDcU.js → shared-V6D_md-c.js} +120 -120
- package/dist/{sin-D2CKKmyR.js → sin-CPxad7Am.js} +1 -1
- package/dist/{slice-BnyE-M_7.js → slice-B7jXtPnp.js} +1 -1
- package/dist/{softmax-DLoZWYBx.js → softmax-BfsyI4As.js} +1 -1
- package/dist/{split-By_n4TKP.js → split-BPxr8_8m.js} +1 -1
- package/dist/{stack-DkdFLq37.js → stack-BNwLzE43.js} +1 -1
- package/dist/{sum-l_0SqM4h.js → sum-ByFINZgi.js} +1 -1
- package/dist/{tensor-BAQdLqoU.js → tensor-DbqgIV9B.js} +1 -1
- package/dist/tensor1d-CtJq5BOv.js +27 -0
- package/dist/{tensor2d-BHy261cI.js → tensor2d-CObBWBkW.js} +1 -1
- package/dist/tensor4d-DLtk7Nxh.js +30 -0
- package/dist/training/Adam.js +2 -2
- package/dist/training/AdamExt.js +1 -1
- package/dist/training/DatasetBuilder.js +2 -2
- package/dist/training/FullTrainer.js +1 -1
- package/dist/training/Trainer.js +2 -2
- package/dist/training/sparseCrossEntropy.js +8 -9
- package/dist/utilities/arrayClose.d.ts +1 -1
- package/dist/utilities/arrayClose.js +16 -7
- package/dist/utilities/dummy.js +2 -2
- package/dist/utilities/multinomialCPU.js +2 -2
- package/dist/utilities/performance.js +1 -1
- package/dist/utilities/profile.js +1 -1
- package/dist/utilities/safetensors.js +2 -2
- package/dist/utilities/weights.js +2 -2
- package/dist/{variable-C9hihzDB.js → variable-DPFOJyRG.js} +1 -1
- package/dist/{webgpu_program-dFEVbDPL.js → webgpu_program-Dhk9R5aG.js} +1 -1
- package/dist/{webgpu_util-DLImlSc6.js → webgpu_util-BqGnZg8t.js} +1 -1
- package/dist/{zeros-VZ72lWXM.js → zeros-Dnwix0p4.js} +1 -1
- package/package.json +1 -1
- package/dist/ops-C_1K_-35.js +0 -1202
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z as i, A as u, B as c, s as l, e as h } from "../index-DdmHGZjq.js";
|
|
2
|
+
import { t as f } from "../tensor2d-CObBWBkW.js";
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2018 Google LLC. All Rights Reserved.
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
* =============================================================================
|
|
18
|
+
*/
|
|
19
|
+
function m(t, e, n) {
|
|
20
|
+
if (i(t), e != null && e.length !== 3)
|
|
21
|
+
throw new Error("tensor3d() requires shape to have three numbers");
|
|
22
|
+
const r = u(t, n);
|
|
23
|
+
if (r.length !== 3 && r.length !== 1)
|
|
24
|
+
throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");
|
|
25
|
+
if (r.length === 1 && e == null)
|
|
26
|
+
throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");
|
|
27
|
+
return c(t, e, r, n);
|
|
28
|
+
}
|
|
29
|
+
async function y(t) {
|
|
30
|
+
await l(t);
|
|
31
|
+
const e = m(
|
|
32
|
+
[
|
|
33
|
+
[
|
|
34
|
+
[0.1, 0.2],
|
|
35
|
+
[0.3, 0.4]
|
|
36
|
+
]
|
|
37
|
+
],
|
|
38
|
+
[1, 2, 2]
|
|
39
|
+
), n = f(
|
|
40
|
+
[
|
|
41
|
+
[0.5, 0.6, 0.9, 1, 1.3, 1.4],
|
|
42
|
+
[0.7, 0.8, 1.1, 1.2, 1.5, 1.6]
|
|
43
|
+
],
|
|
44
|
+
[2, 6]
|
|
45
|
+
), r = h().runKernel("QKV", { x: e, kernel: n }, { heads: 1 }), o = await r[0].array(), a = await r[1].array(), s = await r[2].array();
|
|
46
|
+
return [o, a, s];
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
y as execute
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function execute(backend: string): Promise<number | number[] | number[][] | number[][][] | number[][][][] | number[][][][][] | number[][][][][][] | Promise<number | number[] | number[][] | number[][][] | number[][][][] | number[][][][][] | number[][][][][][]>[]>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import t from "../layers/RoPECache.js";
|
|
2
|
+
import { s as c, e as i } from "../index-DdmHGZjq.js";
|
|
3
|
+
import { t as p } from "../tensor4d-DLtk7Nxh.js";
|
|
4
|
+
async function y(a) {
|
|
5
|
+
await c(a);
|
|
6
|
+
const o = p(
|
|
7
|
+
[
|
|
8
|
+
[
|
|
9
|
+
[
|
|
10
|
+
[0.1, 0.2],
|
|
11
|
+
[0.3, 0.4]
|
|
12
|
+
]
|
|
13
|
+
]
|
|
14
|
+
],
|
|
15
|
+
[1, 1, 2, 2]
|
|
16
|
+
), n = {
|
|
17
|
+
biasInLayerNorm: !1,
|
|
18
|
+
vocabSize: 20,
|
|
19
|
+
nEmbed: 16,
|
|
20
|
+
nHead: 2,
|
|
21
|
+
nLayer: 1,
|
|
22
|
+
biasInLinear: !1,
|
|
23
|
+
dropout: 0,
|
|
24
|
+
blockSize: 128,
|
|
25
|
+
mlpFactor: 4,
|
|
26
|
+
useRope: !0
|
|
27
|
+
}, e = new t(n);
|
|
28
|
+
e.ensureRopeCache(120);
|
|
29
|
+
const r = i().runKernel(
|
|
30
|
+
"Rope",
|
|
31
|
+
{ x: o, sin: e.getSin(), cos: e.getCos() },
|
|
32
|
+
{ pastLen: 20 }
|
|
33
|
+
);
|
|
34
|
+
return Array.isArray(r) ? r.map((s) => s.array()) : r.array();
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
y as execute
|
|
38
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as BaseLayer } from '../layers/BaseLayer';
|
|
2
|
+
import { Tensor } from '@tensorflow/tfjs-core';
|
|
3
|
+
export interface TensorStatistics {
|
|
4
|
+
mean: number;
|
|
5
|
+
std: number;
|
|
6
|
+
min: number;
|
|
7
|
+
max: number;
|
|
8
|
+
sparsity: number;
|
|
9
|
+
isFinite: boolean;
|
|
10
|
+
hasNaN: boolean;
|
|
11
|
+
closeToZeroCount: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function createTensorStatistics(weight: Tensor | number[]): Promise<TensorStatistics>;
|
|
14
|
+
export declare function createWeightStatistics(layer: BaseLayer): Promise<{
|
|
15
|
+
[key: string]: TensorStatistics;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
async function d(s) {
|
|
2
|
+
const e = Array.isArray(s) ? s : await s.data(), a = e.length;
|
|
3
|
+
let n = 0, l = 0, i = e[0], r = e[0], u = 0, h = !0, f = !1, m = 0;
|
|
4
|
+
for (let c = 0; c < a; c++) {
|
|
5
|
+
const t = e[c];
|
|
6
|
+
n += t, l += t * t, t < i && (i = t), t > r && (r = t), t === 0 && u++, Math.abs(t) < 1e-8 && m++, Number.isNaN(t) && (f = !0);
|
|
7
|
+
}
|
|
8
|
+
const o = n / a, y = l / a - o * o, N = Math.sqrt(y), b = u / a;
|
|
9
|
+
return {
|
|
10
|
+
mean: o,
|
|
11
|
+
std: N,
|
|
12
|
+
min: i,
|
|
13
|
+
max: r,
|
|
14
|
+
sparsity: b,
|
|
15
|
+
isFinite: h,
|
|
16
|
+
hasNaN: f,
|
|
17
|
+
closeToZeroCount: m
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
async function S(s) {
|
|
21
|
+
const e = s.trainableVariables, a = {};
|
|
22
|
+
for (const n of e)
|
|
23
|
+
a[n.name] = await d(n);
|
|
24
|
+
return a;
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
d as createTensorStatistics,
|
|
28
|
+
S as createWeightStatistics
|
|
29
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ak as S, T as h, ag as k, d as v, al as o, am as p, an as g, n as N, t as y } from "./index-DdmHGZjq.js";
|
|
2
2
|
import { s as R } from "./index-C4L8Cm77.js";
|
|
3
|
-
import { s as $ } from "./stack-
|
|
4
|
-
import { t as B } from "./tensor-
|
|
3
|
+
import { s as $ } from "./stack-BNwLzE43.js";
|
|
4
|
+
import { t as B } from "./tensor-DbqgIV9B.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2018 Google LLC. All Rights Reserved.
|
|
@@ -381,7 +381,7 @@ class i {
|
|
|
381
381
|
* throw an `Error`.
|
|
382
382
|
*/
|
|
383
383
|
handleErrors(t) {
|
|
384
|
-
return new
|
|
384
|
+
return new Z(this, t);
|
|
385
385
|
}
|
|
386
386
|
// TODO(soergel): Implement reduce() etc.
|
|
387
387
|
/**
|
|
@@ -708,7 +708,7 @@ class K extends i {
|
|
|
708
708
|
return { value: r, done: !1 };
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
class
|
|
711
|
+
class Z extends i {
|
|
712
712
|
constructor(t, e) {
|
|
713
713
|
super(), this.upstream = t, this.handler = e, this.count = 0, this.lastRead = Promise.resolve({ value: null, done: !1 });
|
|
714
714
|
}
|
|
@@ -745,7 +745,7 @@ class w extends i {
|
|
|
745
745
|
return { value: r, done: !1 };
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
|
-
class
|
|
748
|
+
class j extends i {
|
|
749
749
|
constructor() {
|
|
750
750
|
super(), this.outputQueue = new f(), this.lastRead = Promise.resolve({ value: null, done: !1 });
|
|
751
751
|
}
|
|
@@ -759,7 +759,7 @@ class Z extends i {
|
|
|
759
759
|
return { value: this.outputQueue.shift(), done: !1 };
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
|
-
class tt extends
|
|
762
|
+
class tt extends j {
|
|
763
763
|
constructor(t, e) {
|
|
764
764
|
super(), this.upstream = t, this.transform = e;
|
|
765
765
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as
|
|
1
|
+
import { C as l, D as h, E as m, ao as p, M as c, ap as f, af as g, n as u, T as V, o as v, q as N, a as w } from "./index-DdmHGZjq.js";
|
|
2
|
+
import { s as d } from "./index-C4L8Cm77.js";
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
5
5
|
* Copyright 2018 Google LLC. All Rights Reserved.
|
|
@@ -41,7 +41,7 @@ class T {
|
|
|
41
41
|
constructor(t, e, s, n, o) {
|
|
42
42
|
this.mean = t, this.stdDev = e, this.dtype = s, this.nextVal = NaN, this.truncated = n, this.truncated && (this.upper = this.mean + this.stdDev * 2, this.lower = this.mean - this.stdDev * 2);
|
|
43
43
|
const a = o || Math.random();
|
|
44
|
-
this.random =
|
|
44
|
+
this.random = d.alea(a.toString());
|
|
45
45
|
}
|
|
46
46
|
/** Returns next sample from a Gaussian distribution. */
|
|
47
47
|
nextValue() {
|
|
@@ -69,11 +69,11 @@ class T {
|
|
|
69
69
|
return t <= this.upper && t >= this.lower;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
class
|
|
72
|
+
class M {
|
|
73
73
|
constructor(t = 0, e = 1, s, n) {
|
|
74
74
|
if (this.canReturnFloat = () => this.dtype == null || this.dtype === "float32", this.min = t, this.range = e - t, this.dtype = s, n == null && (n = Math.random()), typeof n == "number" && (n = n.toString()), !this.canReturnFloat() && this.range <= 1)
|
|
75
75
|
throw new Error(`The difference between ${t} - ${e} <= 1 and dtype is not float`);
|
|
76
|
-
this.random =
|
|
76
|
+
this.random = d.alea(n);
|
|
77
77
|
}
|
|
78
78
|
convertValue(t) {
|
|
79
79
|
return this.canReturnFloat() ? t : Math.round(t);
|
|
@@ -98,15 +98,15 @@ class $ {
|
|
|
98
98
|
* limitations under the License.
|
|
99
99
|
* =============================================================================
|
|
100
100
|
*/
|
|
101
|
-
function
|
|
101
|
+
function $(r, t = 0, e = 1, s, n) {
|
|
102
102
|
if (c(r), s != null && s === "bool")
|
|
103
103
|
throw new Error(`Unsupported data type ${s}`);
|
|
104
|
-
const o = new T(t, e, s, !1, n), a =
|
|
104
|
+
const o = new T(t, e, s, !1, n), a = f(r, s);
|
|
105
105
|
for (let i = 0; i < a.values.length; i++)
|
|
106
106
|
a.values[i] = o.nextValue();
|
|
107
107
|
return a.toTensor();
|
|
108
108
|
}
|
|
109
|
-
const _ = /* @__PURE__ */ l({ randomNormal_:
|
|
109
|
+
const _ = /* @__PURE__ */ l({ randomNormal_: $ });
|
|
110
110
|
/**
|
|
111
111
|
* @license
|
|
112
112
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
@@ -123,14 +123,14 @@ const _ = /* @__PURE__ */ l({ randomNormal_: y });
|
|
|
123
123
|
* limitations under the License.
|
|
124
124
|
* =============================================================================
|
|
125
125
|
*/
|
|
126
|
-
function
|
|
126
|
+
function y(r, t = 0, e = 1, s = "float32", n) {
|
|
127
127
|
c(r);
|
|
128
|
-
const o =
|
|
128
|
+
const o = f(r, s), a = new M(t, e, null, n);
|
|
129
129
|
for (let i = 0; i < o.values.length; i++)
|
|
130
130
|
o.values[i] = a.nextValue();
|
|
131
131
|
return o.toTensor();
|
|
132
132
|
}
|
|
133
|
-
const D = /* @__PURE__ */ l({ randomUniform_:
|
|
133
|
+
const D = /* @__PURE__ */ l({ randomUniform_: y });
|
|
134
134
|
/**
|
|
135
135
|
* @license
|
|
136
136
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aD as z, ag as v, aE as oe, aF as ie, aG as ae, n as F, aH as me, aI as J, a3 as B, aJ as I, af as T, j as E, aK as H, aL as $e, aM as Y, ae as Te } from "./index-DdmHGZjq.js";
|
|
2
2
|
import "./index-Tf7vU29b.js";
|
|
3
|
-
import { b as Se } from "./backend_util-
|
|
3
|
+
import { b as Se } from "./backend_util-yC3YH1jo.js";
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2018 Google LLC. All Rights Reserved.
|