@genai-fi/nanogpt 0.19.1 → 0.20.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/package.json +9 -10
- package/dist/Generator.d.ts +0 -82
- package/dist/Generator.js +0 -11941
- package/dist/RealDiv-CGwv0liw.js +0 -365
- package/dist/Reshape-BW__R4mZ.js +0 -79
- package/dist/Reshape-CPBkTIH2.js +0 -14
- package/dist/TeachableLLM.d.ts +0 -70
- package/dist/TeachableLLM.js +0 -273
- package/dist/Trainer.d.ts +0 -43
- package/dist/Trainer.js +0 -244
- package/dist/_commonjsHelpers-ByX85dGu.js +0 -33
- package/dist/axis_util-GTVlo58H.js +0 -55
- package/dist/backend.d.ts +0 -2
- package/dist/backend.js +0 -13
- package/dist/backend_util-GaFarB78.js +0 -425
- package/dist/backend_webgpu-BqASlsbV.js +0 -545
- package/dist/binary_op_util-pKXltfxI.js +0 -192
- package/dist/broadcast_to-eS93CCN_.js +0 -28
- package/dist/checks/appendCache.d.ts +0 -1
- package/dist/checks/appendCache.js +0 -22
- package/dist/checks/attentionMask.d.ts +0 -1
- package/dist/checks/attentionMask.js +0 -37
- package/dist/checks/check.d.ts +0 -9
- package/dist/checks/check.js +0 -20
- package/dist/checks/gelu.d.ts +0 -1
- package/dist/checks/gelu.js +0 -18
- package/dist/checks/index.d.ts +0 -26
- package/dist/checks/index.js +0 -28
- package/dist/checks/matMulGelu.d.ts +0 -1
- package/dist/checks/matMulGelu.js +0 -28
- package/dist/checks/normRMS.d.ts +0 -1
- package/dist/checks/normRMS.js +0 -16
- package/dist/checks/normRMSGrad.d.ts +0 -1
- package/dist/checks/normRMSGrad.js +0 -12
- package/dist/checks/packUnpack.d.ts +0 -1
- package/dist/checks/packUnpack.js +0 -18
- package/dist/checks/qkv.d.ts +0 -1
- package/dist/checks/qkv.js +0 -34
- package/dist/checks/rope.d.ts +0 -1
- package/dist/checks/rope.js +0 -36
- package/dist/checks/weights.d.ts +0 -14
- package/dist/checks/weights.js +0 -31
- package/dist/clip_by_value-DDA7rrcT.js +0 -12
- package/dist/complex-DI35Q-gW.js +0 -11
- package/dist/complex_util-Yc1A_gV1.js +0 -55
- package/dist/concat-CAQpCret.js +0 -17
- package/dist/concat_util-D18dJ4fD.js +0 -22
- package/dist/data/docx.d.ts +0 -2
- package/dist/data/docx.js +0 -15
- package/dist/data/parquet.d.ts +0 -2
- package/dist/data/parquet.js +0 -17
- package/dist/data/pdf.d.ts +0 -2
- package/dist/data/pdf.js +0 -14
- package/dist/data/textLoader.d.ts +0 -7
- package/dist/data/textLoader.js +0 -118
- package/dist/dataset-CGGp1z9P.js +0 -1124
- package/dist/dropout_util--NxWuYg2.js +0 -27
- package/dist/expand_dims-Bkd1YD5x.js +0 -11
- package/dist/exports_initializers-CYzKLjN7.js +0 -7
- package/dist/floor-BQtb-Azg.js +0 -9
- package/dist/gather-qIqEqaGn.js +0 -9
- package/dist/gelu-B220X1Go.js +0 -26
- package/dist/gpgpu_math-BwvV12df.js +0 -2022
- package/dist/index-CUXkjxiT.js +0 -3516
- package/dist/index-CieiGp4Y.js +0 -349
- package/dist/index-CjOWnMXP.js +0 -7308
- package/dist/index-Cp39cXWe.js +0 -1016
- package/dist/index-D5v913EJ.js +0 -4
- package/dist/index-DmeWGGmS.js +0 -1074
- package/dist/index-DvYrXKkX.js +0 -113
- package/dist/index-Ksja3su6.js +0 -151
- package/dist/index-xuotMAFm.js +0 -118
- package/dist/inference/types.d.ts +0 -16
- package/dist/inference/types.js +0 -1
- package/dist/jszip.min-BZhlzntC.js +0 -2313
- package/dist/kernel_funcs_utils-pq0CK9co.js +0 -306
- package/dist/layers/BaseLayer.d.ts +0 -44
- package/dist/layers/BaseLayer.js +0 -74
- package/dist/layers/CausalSelfAttention.d.ts +0 -39
- package/dist/layers/CausalSelfAttention.js +0 -86
- package/dist/layers/LoRA.d.ts +0 -14
- package/dist/layers/LoRA.js +0 -58
- package/dist/layers/MLP.d.ts +0 -17
- package/dist/layers/MLP.js +0 -44
- package/dist/layers/PositionEmbedding.d.ts +0 -8
- package/dist/layers/PositionEmbedding.js +0 -31
- package/dist/layers/RMSNorm.d.ts +0 -12
- package/dist/layers/RMSNorm.js +0 -22
- package/dist/layers/RoPECache.d.ts +0 -18
- package/dist/layers/RoPECache.js +0 -50
- package/dist/layers/TiedEmbedding.d.ts +0 -13
- package/dist/layers/TiedEmbedding.js +0 -36
- package/dist/layers/TransformerBlock.d.ts +0 -27
- package/dist/layers/TransformerBlock.js +0 -40
- package/dist/layers/WeightStore.d.ts +0 -20
- package/dist/layers/WeightStore.js +0 -76
- package/dist/loader/load.d.ts +0 -6
- package/dist/loader/load.js +0 -68
- package/dist/loader/loadHF.d.ts +0 -8
- package/dist/loader/loadHF.js +0 -22
- package/dist/loader/loadTransformers.d.ts +0 -4
- package/dist/loader/loadTransformers.js +0 -44
- package/dist/loader/loadZipMeta.d.ts +0 -3
- package/dist/loader/loadZipMeta.js +0 -16
- package/dist/loader/newZipLoad.d.ts +0 -3
- package/dist/loader/newZipLoad.js +0 -31
- package/dist/loader/oldZipLoad.d.ts +0 -9
- package/dist/loader/oldZipLoad.js +0 -80
- package/dist/loader/save.d.ts +0 -16
- package/dist/loader/save.js +0 -90
- package/dist/loader/types.d.ts +0 -67
- package/dist/loader/types.js +0 -1
- package/dist/main.d.ts +0 -50
- package/dist/main.js +0 -109
- package/dist/matMul16-BcVC_E62.js +0 -80
- package/dist/matMulGelu-JNLZqKQp.js +0 -163
- package/dist/mat_mul-DhG0Newp.js +0 -11
- package/dist/mod-CSdCpRjf.js +0 -11
- package/dist/models/NanoGPTV1.d.ts +0 -16
- package/dist/models/NanoGPTV1.js +0 -99
- package/dist/models/NanoGPTV2.d.ts +0 -16
- package/dist/models/NanoGPTV2.js +0 -90
- package/dist/models/config.d.ts +0 -27
- package/dist/models/config.js +0 -50
- package/dist/models/factory.d.ts +0 -3
- package/dist/models/factory.js +0 -16
- package/dist/models/model.d.ts +0 -44
- package/dist/models/model.js +0 -134
- package/dist/non_max_suppression_impl-B2W7YjZB.js +0 -102
- package/dist/not_equal-hurPF26l.js +0 -64
- package/dist/ones-BytntneX.js +0 -14
- package/dist/ops/adamAdjust.d.ts +0 -2
- package/dist/ops/adamAdjust.js +0 -9
- package/dist/ops/adamMoments.d.ts +0 -2
- package/dist/ops/adamMoments.js +0 -9
- package/dist/ops/add16.d.ts +0 -2
- package/dist/ops/add16.js +0 -9
- package/dist/ops/appendCache.d.ts +0 -2
- package/dist/ops/appendCache.js +0 -22
- package/dist/ops/attentionMask.d.ts +0 -2
- package/dist/ops/attentionMask.js +0 -10
- package/dist/ops/concat16.d.ts +0 -2
- package/dist/ops/concat16.js +0 -9
- package/dist/ops/cpu/adamAdjust.d.ts +0 -1
- package/dist/ops/cpu/adamAdjust.js +0 -18
- package/dist/ops/cpu/adamMoments.d.ts +0 -1
- package/dist/ops/cpu/adamMoments.js +0 -16
- package/dist/ops/cpu/appendCache.d.ts +0 -1
- package/dist/ops/cpu/appendCache.js +0 -23
- package/dist/ops/cpu/attentionMask.d.ts +0 -1
- package/dist/ops/cpu/attentionMask.js +0 -22
- package/dist/ops/cpu/fusedSoftmax.d.ts +0 -9
- package/dist/ops/cpu/fusedSoftmax.js +0 -29
- package/dist/ops/cpu/gatherSub.d.ts +0 -1
- package/dist/ops/cpu/gatherSub.js +0 -18
- package/dist/ops/cpu/gelu.d.ts +0 -1
- package/dist/ops/cpu/gelu.js +0 -40
- package/dist/ops/cpu/matMul16.d.ts +0 -1
- package/dist/ops/cpu/matMul16.js +0 -15
- package/dist/ops/cpu/matMulGelu.d.ts +0 -1
- package/dist/ops/cpu/matMulGelu.js +0 -53
- package/dist/ops/cpu/matMulMul.d.ts +0 -1
- package/dist/ops/cpu/matMulMul.js +0 -23
- package/dist/ops/cpu/mulDropout.d.ts +0 -1
- package/dist/ops/cpu/mulDropout.js +0 -23
- package/dist/ops/cpu/normRMS.d.ts +0 -1
- package/dist/ops/cpu/normRMS.js +0 -39
- package/dist/ops/cpu/qkv.d.ts +0 -5
- package/dist/ops/cpu/qkv.js +0 -41
- package/dist/ops/cpu/rope.d.ts +0 -6
- package/dist/ops/cpu/rope.js +0 -38
- package/dist/ops/cpu/scatterSub.d.ts +0 -1
- package/dist/ops/cpu/scatterSub.js +0 -23
- package/dist/ops/dot16.d.ts +0 -2
- package/dist/ops/dot16.js +0 -42
- package/dist/ops/dropout.d.ts +0 -2
- package/dist/ops/dropout.js +0 -14
- package/dist/ops/dropout16.d.ts +0 -2
- package/dist/ops/dropout16.js +0 -25
- package/dist/ops/gatherSub.d.ts +0 -2
- package/dist/ops/gatherSub.js +0 -9
- package/dist/ops/gelu.d.ts +0 -3
- package/dist/ops/gelu.js +0 -8
- package/dist/ops/globalNorm.d.ts +0 -2
- package/dist/ops/globalNorm.js +0 -13
- package/dist/ops/grads/add16.d.ts +0 -1
- package/dist/ops/grads/add16.js +0 -26
- package/dist/ops/grads/attentionMask.d.ts +0 -1
- package/dist/ops/grads/attentionMask.js +0 -21
- package/dist/ops/grads/dropout16.d.ts +0 -1
- package/dist/ops/grads/dropout16.js +0 -2
- package/dist/ops/grads/gelu.d.ts +0 -2
- package/dist/ops/grads/gelu.js +0 -5
- package/dist/ops/grads/matMul16.d.ts +0 -2
- package/dist/ops/grads/matMul16.js +0 -9
- package/dist/ops/grads/matMulGelu.d.ts +0 -1
- package/dist/ops/grads/matMulGelu.js +0 -17
- package/dist/ops/grads/mul16.d.ts +0 -1
- package/dist/ops/grads/mul16.js +0 -4
- package/dist/ops/grads/normRMS.d.ts +0 -3
- package/dist/ops/grads/normRMS.js +0 -33
- package/dist/ops/grads/pack16.d.ts +0 -2
- package/dist/ops/grads/pack16.js +0 -6
- package/dist/ops/grads/qkv.d.ts +0 -3
- package/dist/ops/grads/qkv.js +0 -34
- package/dist/ops/grads/rope.d.ts +0 -2
- package/dist/ops/grads/rope.js +0 -5
- package/dist/ops/grads/softmax16.d.ts +0 -2
- package/dist/ops/grads/softmax16.js +0 -25
- package/dist/ops/grads/unpack16.d.ts +0 -2
- package/dist/ops/grads/unpack16.js +0 -5
- package/dist/ops/grads/utils.d.ts +0 -4
- package/dist/ops/grads/utils.js +0 -14
- package/dist/ops/log.d.ts +0 -0
- package/dist/ops/log.js +0 -1
- package/dist/ops/matMul16.d.ts +0 -15
- package/dist/ops/matMul16.js +0 -13
- package/dist/ops/matMulGelu.d.ts +0 -3
- package/dist/ops/matMulGelu.js +0 -14
- package/dist/ops/matMulMul.d.ts +0 -2
- package/dist/ops/matMulMul.js +0 -9
- package/dist/ops/mul16.d.ts +0 -2
- package/dist/ops/mul16.js +0 -39
- package/dist/ops/mulDrop.d.ts +0 -2
- package/dist/ops/mulDrop.js +0 -9
- package/dist/ops/normRMS.d.ts +0 -2
- package/dist/ops/normRMS.js +0 -19
- package/dist/ops/pack16.d.ts +0 -2
- package/dist/ops/pack16.js +0 -5
- package/dist/ops/qkv.d.ts +0 -2
- package/dist/ops/qkv.js +0 -10
- package/dist/ops/reshape16.d.ts +0 -2
- package/dist/ops/reshape16.js +0 -41
- package/dist/ops/rope.d.ts +0 -3
- package/dist/ops/rope.js +0 -7
- package/dist/ops/scatterSub.d.ts +0 -2
- package/dist/ops/scatterSub.js +0 -9
- package/dist/ops/slice16.d.ts +0 -2
- package/dist/ops/slice16.js +0 -9
- package/dist/ops/softmax16.d.ts +0 -2
- package/dist/ops/softmax16.js +0 -9
- package/dist/ops/sub16.d.ts +0 -2
- package/dist/ops/sub16.js +0 -8
- package/dist/ops/sum16.d.ts +0 -2
- package/dist/ops/sum16.js +0 -13
- package/dist/ops/transpose16.d.ts +0 -3
- package/dist/ops/transpose16.js +0 -40
- package/dist/ops/unpack16.d.ts +0 -2
- package/dist/ops/unpack16.js +0 -6
- package/dist/ops/webgl/adamAdjust.d.ts +0 -1
- package/dist/ops/webgl/adamAdjust.js +0 -49
- package/dist/ops/webgl/adamMoments.d.ts +0 -1
- package/dist/ops/webgl/adamMoments.js +0 -40
- package/dist/ops/webgl/appendCache.d.ts +0 -1
- package/dist/ops/webgl/appendCache.js +0 -44
- package/dist/ops/webgl/attentionMask.d.ts +0 -1
- package/dist/ops/webgl/attentionMask.js +0 -45
- package/dist/ops/webgl/dropout16.d.ts +0 -1
- package/dist/ops/webgl/dropout16.js +0 -11
- package/dist/ops/webgl/fusedSoftmax.d.ts +0 -11
- package/dist/ops/webgl/fusedSoftmax.js +0 -80
- package/dist/ops/webgl/gatherSub.d.ts +0 -1
- package/dist/ops/webgl/gatherSub.js +0 -27
- package/dist/ops/webgl/gelu.d.ts +0 -2
- package/dist/ops/webgl/gelu.js +0 -50
- package/dist/ops/webgl/log.d.ts +0 -17
- package/dist/ops/webgl/log.js +0 -23
- package/dist/ops/webgl/matMul16.d.ts +0 -1
- package/dist/ops/webgl/matMul16.js +0 -45
- package/dist/ops/webgl/matMulGelu.d.ts +0 -21
- package/dist/ops/webgl/matMulGelu.js +0 -9
- package/dist/ops/webgl/matMulMul.d.ts +0 -14
- package/dist/ops/webgl/matMulMul.js +0 -28
- package/dist/ops/webgl/mulDropout.d.ts +0 -1
- package/dist/ops/webgl/mulDropout.js +0 -41
- package/dist/ops/webgl/normRMS.d.ts +0 -1
- package/dist/ops/webgl/normRMS.js +0 -93
- package/dist/ops/webgl/qkv.d.ts +0 -1
- package/dist/ops/webgl/qkv.js +0 -46
- package/dist/ops/webgl/rope.d.ts +0 -1
- package/dist/ops/webgl/rope.js +0 -56
- package/dist/ops/webgl/scatterSub.d.ts +0 -1
- package/dist/ops/webgl/scatterSub.js +0 -27
- package/dist/ops/webgpu/adamAdjust.d.ts +0 -1
- package/dist/ops/webgpu/adamAdjust.js +0 -57
- package/dist/ops/webgpu/adamMoments.d.ts +0 -1
- package/dist/ops/webgpu/adamMoments.js +0 -60
- package/dist/ops/webgpu/add16.d.ts +0 -1
- package/dist/ops/webgpu/add16.js +0 -13
- package/dist/ops/webgpu/appendCache.d.ts +0 -1
- package/dist/ops/webgpu/appendCache.js +0 -105
- package/dist/ops/webgpu/attentionMask.d.ts +0 -1
- package/dist/ops/webgpu/attentionMask.js +0 -26
- package/dist/ops/webgpu/attentionMask32_program.d.ts +0 -19
- package/dist/ops/webgpu/attentionMask32_program.js +0 -54
- package/dist/ops/webgpu/clipScale.d.ts +0 -1
- package/dist/ops/webgpu/clipScale.js +0 -58
- package/dist/ops/webgpu/concat16.d.ts +0 -19
- package/dist/ops/webgpu/concat16.js +0 -126
- package/dist/ops/webgpu/dropout16.d.ts +0 -1
- package/dist/ops/webgpu/dropout16.js +0 -51
- package/dist/ops/webgpu/gatherSub.d.ts +0 -1
- package/dist/ops/webgpu/gatherSub.js +0 -39
- package/dist/ops/webgpu/gelu.d.ts +0 -14
- package/dist/ops/webgpu/gelu.js +0 -141
- package/dist/ops/webgpu/index.d.ts +0 -0
- package/dist/ops/webgpu/index.js +0 -26
- package/dist/ops/webgpu/matMul16.d.ts +0 -1
- package/dist/ops/webgpu/matMul16.js +0 -65
- package/dist/ops/webgpu/matMul16_program.d.ts +0 -42
- package/dist/ops/webgpu/matMul16_program.js +0 -343
- package/dist/ops/webgpu/mul16.d.ts +0 -1
- package/dist/ops/webgpu/mul16.js +0 -13
- package/dist/ops/webgpu/norm2.d.ts +0 -1
- package/dist/ops/webgpu/norm2.js +0 -76
- package/dist/ops/webgpu/normRMS.d.ts +0 -1
- package/dist/ops/webgpu/normRMS.js +0 -34
- package/dist/ops/webgpu/normRMS16_program.d.ts +0 -10
- package/dist/ops/webgpu/normRMS16_program.js +0 -25
- package/dist/ops/webgpu/normRMS32_program.d.ts +0 -10
- package/dist/ops/webgpu/normRMS32_program.js +0 -25
- package/dist/ops/webgpu/normRMSGrad.d.ts +0 -1
- package/dist/ops/webgpu/normRMSGrad.js +0 -284
- package/dist/ops/webgpu/pack16.d.ts +0 -1
- package/dist/ops/webgpu/pack16.js +0 -18
- package/dist/ops/webgpu/pack16_program.d.ts +0 -19
- package/dist/ops/webgpu/pack16_program.js +0 -92
- package/dist/ops/webgpu/qkv.d.ts +0 -1
- package/dist/ops/webgpu/qkv.js +0 -24
- package/dist/ops/webgpu/rope.d.ts +0 -1
- package/dist/ops/webgpu/rope.js +0 -135
- package/dist/ops/webgpu/scatterSub.d.ts +0 -1
- package/dist/ops/webgpu/scatterSub.js +0 -40
- package/dist/ops/webgpu/slice16.d.ts +0 -7
- package/dist/ops/webgpu/slice16.js +0 -69
- package/dist/ops/webgpu/softmax16.d.ts +0 -17
- package/dist/ops/webgpu/softmax16.js +0 -21
- package/dist/ops/webgpu/softmax16_program.d.ts +0 -13
- package/dist/ops/webgpu/softmax16_program.js +0 -73
- package/dist/ops/webgpu/softmax16_subgroup_program.d.ts +0 -17
- package/dist/ops/webgpu/softmax16_subgroup_program.js +0 -75
- package/dist/ops/webgpu/softmax16grad.d.ts +0 -1
- package/dist/ops/webgpu/softmax16grad.js +0 -37
- package/dist/ops/webgpu/sub16.d.ts +0 -1
- package/dist/ops/webgpu/sub16.js +0 -13
- package/dist/ops/webgpu/sum16.d.ts +0 -1
- package/dist/ops/webgpu/sum16.js +0 -38
- package/dist/ops/webgpu/transpose16.d.ts +0 -1
- package/dist/ops/webgpu/transpose16.js +0 -34
- package/dist/ops/webgpu/transpose16_program.d.ts +0 -16
- package/dist/ops/webgpu/transpose16_program.js +0 -50
- package/dist/ops/webgpu/transpose16_shared_program.d.ts +0 -15
- package/dist/ops/webgpu/transpose16_shared_program.js +0 -70
- package/dist/ops/webgpu/unpack16.d.ts +0 -1
- package/dist/ops/webgpu/unpack16.js +0 -48
- package/dist/ops/webgpu/utils/binary_op.d.ts +0 -35
- package/dist/ops/webgpu/utils/binary_op.js +0 -139
- package/dist/ops/webgpu/utils/deviceInfo.d.ts +0 -7
- package/dist/ops/webgpu/utils/deviceInfo.js +0 -11
- package/dist/ops/webgpu/utils/reductions.d.ts +0 -43
- package/dist/ops/webgpu/utils/reductions.js +0 -275
- package/dist/ops-CsXeTq1P.js +0 -476
- package/dist/pack16-bqltoUlR.js +0 -39
- package/dist/papaparse.min-C0cScC2i.js +0 -418
- package/dist/parquet-Bqjmp2vo.js +0 -44231
- package/dist/patches/webgpu_backend.d.ts +0 -18
- package/dist/patches/webgpu_backend.js +0 -56
- package/dist/patches/webgpu_base.d.ts +0 -21
- package/dist/patches/webgpu_base.js +0 -34
- package/dist/patches/webgpu_program.d.ts +0 -36
- package/dist/patches/webgpu_program.js +0 -400
- package/dist/pdf-NIhmP3sq.js +0 -19477
- package/dist/rand_util-CZ7yLoUm.js +0 -50
- package/dist/random_normal-IBRrha8a.js +0 -14
- package/dist/random_width-DN5ZtQkM.js +0 -9796
- package/dist/range-C-CjF-LI.js +0 -10
- package/dist/relu-J_X6MUzx.js +0 -9
- package/dist/reshape-BDOuCSNW.js +0 -9
- package/dist/resize_nearest_neighbor-BojqlfRe.js +0 -150
- package/dist/rope-DcrZM_e6.js +0 -24
- package/dist/scatter_nd_util-ByNJaL6I.js +0 -46
- package/dist/segment_util-Dasb2Zaf.js +0 -43
- package/dist/selu_util-BLhIqRkw.js +0 -44
- package/dist/shared-3agzAqQ_.js +0 -53
- package/dist/shared-CagdqkLh.js +0 -2143
- package/dist/slice-BzS11Qh0.js +0 -12
- package/dist/slice_util-CC35pLmT.js +0 -153
- package/dist/softmax-D4q1LJN7.js +0 -12
- package/dist/split-C2Sj255c.js +0 -9
- package/dist/squeeze-ho4wLUek.js +0 -10
- package/dist/stack-DudVrtmG.js +0 -11
- package/dist/step-BTxPtq1r.js +0 -261
- package/dist/sum-BpiwSWvg.js +0 -11
- package/dist/tensor-BWFldCso.js +0 -8
- package/dist/tensor1d-LMGMIUlr.js +0 -11
- package/dist/tensor2d-BnXMKScO.js +0 -14
- package/dist/tensor4d-C6UCG_u8.js +0 -14
- package/dist/tfjs_backend-BGnG-ppu.js +0 -654
- package/dist/tile-CFy-xTO6.js +0 -11
- package/dist/tokeniser/BaseTokeniser.d.ts +0 -33
- package/dist/tokeniser/BaseTokeniser.js +0 -124
- package/dist/tokeniser/CharTokeniser.d.ts +0 -24
- package/dist/tokeniser/CharTokeniser.js +0 -107
- package/dist/tokeniser/bpe.d.ts +0 -28
- package/dist/tokeniser/bpe.js +0 -173
- package/dist/tokeniser/messages.d.ts +0 -61
- package/dist/tokeniser/messages.js +0 -1
- package/dist/tokeniser/type.d.ts +0 -34
- package/dist/tokeniser/type.js +0 -1
- package/dist/training/AdamW.d.ts +0 -36
- package/dist/training/AdamW.js +0 -138
- package/dist/training/BasicTrainer.d.ts +0 -63
- package/dist/training/BasicTrainer.js +0 -265
- package/dist/training/DatasetBuilder.d.ts +0 -26
- package/dist/training/DatasetBuilder.js +0 -86
- package/dist/training/Evaluator.d.ts +0 -19
- package/dist/training/Evaluator.js +0 -39
- package/dist/training/LRScheduler.d.ts +0 -12
- package/dist/training/LRScheduler.js +0 -34
- package/dist/training/PreTrainer.d.ts +0 -11
- package/dist/training/PreTrainer.js +0 -20
- package/dist/training/SFTTrainer.d.ts +0 -12
- package/dist/training/SFTTrainer.js +0 -22
- package/dist/training/loss.d.ts +0 -3
- package/dist/training/loss.js +0 -24
- package/dist/training/orthoGrad.d.ts +0 -2
- package/dist/training/orthoGrad.js +0 -10
- package/dist/training/sparseCrossEntropy.d.ts +0 -7
- package/dist/training/sparseCrossEntropy.js +0 -69
- package/dist/training/tasks/ConversationTask.d.ts +0 -18
- package/dist/training/tasks/ConversationTask.js +0 -40
- package/dist/training/tasks/PretrainingTask.d.ts +0 -17
- package/dist/training/tasks/PretrainingTask.js +0 -47
- package/dist/training/tasks/StartSentenceTask.d.ts +0 -18
- package/dist/training/tasks/StartSentenceTask.js +0 -49
- package/dist/training/tasks/Task.d.ts +0 -22
- package/dist/training/tasks/Task.js +0 -68
- package/dist/training/tasks/splitter.d.ts +0 -5
- package/dist/training/tasks/splitter.js +0 -21
- package/dist/training/types.d.ts +0 -78
- package/dist/training/types.js +0 -1
- package/dist/training/validation.d.ts +0 -17
- package/dist/training/validation.js +0 -84
- package/dist/transpose-9kRxIXWR.js +0 -36
- package/dist/unsorted_segment_sum-DJvk5xnh.js +0 -277
- package/dist/utilities/arrayClose.d.ts +0 -1
- package/dist/utilities/arrayClose.js +0 -20
- package/dist/utilities/datasetID.d.ts +0 -2
- package/dist/utilities/datasetID.js +0 -21
- package/dist/utilities/dummy.d.ts +0 -9
- package/dist/utilities/dummy.js +0 -43
- package/dist/utilities/multinomialCPU.d.ts +0 -2
- package/dist/utilities/multinomialCPU.js +0 -13
- package/dist/utilities/naming.d.ts +0 -4
- package/dist/utilities/naming.js +0 -1
- package/dist/utilities/packed.d.ts +0 -4
- package/dist/utilities/packed.js +0 -15
- package/dist/utilities/parameters.d.ts +0 -11
- package/dist/utilities/parameters.js +0 -57
- package/dist/utilities/performance.d.ts +0 -2
- package/dist/utilities/performance.js +0 -16
- package/dist/utilities/profile.d.ts +0 -17
- package/dist/utilities/profile.js +0 -38
- package/dist/utilities/safetensors.d.ts +0 -3
- package/dist/utilities/safetensors.js +0 -83
- package/dist/utilities/sentences.d.ts +0 -5
- package/dist/utilities/sentences.js +0 -41
- package/dist/utilities/tokenParse.d.ts +0 -1
- package/dist/utilities/tokenParse.js +0 -21
- package/dist/utilities/topP.d.ts +0 -1
- package/dist/utilities/topP.js +0 -13
- package/dist/utilities/waitForModel.d.ts +0 -2
- package/dist/utilities/waitForModel.js +0 -12
- package/dist/utilities/weights.d.ts +0 -12
- package/dist/utilities/weights.js +0 -45
- package/dist/utilities/yielder.d.ts +0 -1
- package/dist/utilities/yielder.js +0 -7
- package/dist/variable-Ck482e3n.js +0 -7
- package/dist/webgpu_program-B4HmApL1.js +0 -525
- package/dist/webgpu_util-DYlGSwOJ.js +0 -64
- package/dist/zeros-DvZpK8s6.js +0 -13
- package/dist/zeros_like-CWjDdwr-.js +0 -721
|
@@ -1,721 +0,0 @@
|
|
|
1
|
-
import { o as u, q as h, E as d, c7 as st, c8 as rt, c9 as nt, ca as et, cb as it, cc as pt, B, cd as at, ce as ht, bY as ut, x as D, cf as ct, cg as ft, i as H, a3 as C, bZ as lt, ch as dt, ci as mt, cj as Dt, aE as yt, ck as It, a2 as wt, m as M, _ as F, cl as xt, cm as gt, L as $, c1 as $t, cn as bt, co as kt, cp as vt, cq as Nt, a as _t, cr as Tt, cs as Et, ct as St, cu as qt, cv as r, a_ as Kt, j as zt, ag as W, cw as Pt, cx as Ct, p as Mt, l as Ot, n as At, a1 as Bt } from "./index-CUXkjxiT.js";
|
|
2
|
-
import { e as j, a as R, l as X, b as G, d as V, f as Z, m as U, r as E, g as Ht, h as Ft, i as Wt, j as jt, k as Rt, n as Xt, o as Gt, c as Vt, p as Zt, q as Ut, t as Yt, u as Jt, v as Lt, w as Qt, 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-DJvk5xnh.js";
|
|
3
|
-
import { r as l } from "./reshape-BDOuCSNW.js";
|
|
4
|
-
import { b as uo } from "./broadcast_to-eS93CCN_.js";
|
|
5
|
-
import { c as co } from "./clip_by_value-DDA7rrcT.js";
|
|
6
|
-
import { c as _ } from "./concat-CAQpCret.js";
|
|
7
|
-
import { w as Y, e as fo, l as lo, b as mo, m as Do, a as yo, n as Io } from "./not_equal-hurPF26l.js";
|
|
8
|
-
import { m as v } from "./mat_mul-DhG0Newp.js";
|
|
9
|
-
import { s as J, k as wo, h as xo, e as go, l as $o, p as bo, r as ko, a as vo } from "./step-BTxPtq1r.js";
|
|
10
|
-
import { n as L, b as S, c as No, g as _o, l as To, a as Eo, d as So, h as qo, m as Ko, f as zo, e as Po, r as Co, s as Mo, u as Oo } from "./resize_nearest_neighbor-BojqlfRe.js";
|
|
11
|
-
import { e as Ao } from "./expand_dims-Bkd1YD5x.js";
|
|
12
|
-
import { f as Bo } from "./floor-BQtb-Azg.js";
|
|
13
|
-
import { g as Ho } from "./gather-qIqEqaGn.js";
|
|
14
|
-
import { c as q } from "./complex-DI35Q-gW.js";
|
|
15
|
-
import { n as N, r as K, i as Q, t as Fo } from "./transpose-9kRxIXWR.js";
|
|
16
|
-
import { s as T } from "./slice-BzS11Qh0.js";
|
|
17
|
-
import { m as Wo } from "./mod-CSdCpRjf.js";
|
|
18
|
-
import { r as jo } from "./relu-J_X6MUzx.js";
|
|
19
|
-
import { s as z } from "./split-C2Sj255c.js";
|
|
20
|
-
import { z as Ro } from "./zeros-DvZpK8s6.js";
|
|
21
|
-
import { s as Xo } from "./softmax-D4q1LJN7.js";
|
|
22
|
-
import { s as Go } from "./squeeze-ho4wLUek.js";
|
|
23
|
-
import { s as Vo } from "./stack-DudVrtmG.js";
|
|
24
|
-
import { s as Zo } from "./sum-BpiwSWvg.js";
|
|
25
|
-
import { t as Uo } from "./tile-CFy-xTO6.js";
|
|
26
|
-
function Yo(t) {
|
|
27
|
-
const s = { x: h(t, "x", "acos") };
|
|
28
|
-
return d.runKernel(st, s);
|
|
29
|
-
}
|
|
30
|
-
const Jo = /* @__PURE__ */ u({ acos_: Yo });
|
|
31
|
-
function Lo(t) {
|
|
32
|
-
const s = { x: h(t, "x", "acosh") };
|
|
33
|
-
return d.runKernel(rt, s);
|
|
34
|
-
}
|
|
35
|
-
const Qo = /* @__PURE__ */ u({ acosh_: Lo });
|
|
36
|
-
function ts(t, o = 0) {
|
|
37
|
-
const n = { x: h(t, "x", "argMin") }, e = { axis: o };
|
|
38
|
-
return d.runKernel(nt, n, e);
|
|
39
|
-
}
|
|
40
|
-
const os = /* @__PURE__ */ u({ argMin_: ts });
|
|
41
|
-
function ss(t) {
|
|
42
|
-
const s = { x: h(t, "x", "asin") };
|
|
43
|
-
return d.runKernel(et, s);
|
|
44
|
-
}
|
|
45
|
-
const rs = /* @__PURE__ */ u({ asin_: ss });
|
|
46
|
-
function ns(t) {
|
|
47
|
-
const s = { x: h(t, "x", "asinh") };
|
|
48
|
-
return d.runKernel(it, s);
|
|
49
|
-
}
|
|
50
|
-
const es = /* @__PURE__ */ u({ asinh_: ns });
|
|
51
|
-
function is(t) {
|
|
52
|
-
const s = { x: h(t, "x", "atan") };
|
|
53
|
-
return d.runKernel(pt, s);
|
|
54
|
-
}
|
|
55
|
-
const ps = /* @__PURE__ */ u({ atan_: is });
|
|
56
|
-
function as(t, o) {
|
|
57
|
-
let s = h(t, "a", "atan2"), n = h(o, "b", "atan2");
|
|
58
|
-
[s, n] = B(s, n);
|
|
59
|
-
const e = { a: s, b: n };
|
|
60
|
-
return d.runKernel(at, e);
|
|
61
|
-
}
|
|
62
|
-
const hs = /* @__PURE__ */ u({ atan2_: as });
|
|
63
|
-
function us(t) {
|
|
64
|
-
const s = { x: h(t, "x", "atanh") };
|
|
65
|
-
return d.runKernel(ht, s);
|
|
66
|
-
}
|
|
67
|
-
const cs = /* @__PURE__ */ u({ atanh_: us });
|
|
68
|
-
function fs(t) {
|
|
69
|
-
const s = { x: h(t, "x", "ceil", "float32") };
|
|
70
|
-
return d.runKernel(ut, s);
|
|
71
|
-
}
|
|
72
|
-
const ls = /* @__PURE__ */ u({ ceil_: fs });
|
|
73
|
-
function ds(t, o, s = "NHWC") {
|
|
74
|
-
const n = h(t, "x", "depthToSpace", "float32"), e = s === "NHWC" ? n.shape[1] : n.shape[2], i = s === "NHWC" ? n.shape[2] : n.shape[3], p = s === "NHWC" ? n.shape[3] : n.shape[1];
|
|
75
|
-
D(o > 1, () => `blockSize should be > 1 for depthToSpace, but was: ${o}`), D(e * o >= 0, () => `Negative dimension size caused by overflow when multiplying
|
|
76
|
-
${e} and ${o} for depthToSpace with input shape
|
|
77
|
-
${n.shape}`), D(i * o >= 0, () => `Negative dimension size caused by overflow when multiplying
|
|
78
|
-
${i} and ${o} for depthToSpace with input shape
|
|
79
|
-
${n.shape}`), D(p % (o * o) === 0, () => `Dimension size must be evenly divisible by ${o * o} but is ${p} for depthToSpace with input shape ${n.shape}`);
|
|
80
|
-
const a = { x: n }, f = { blockSize: o, dataFormat: s };
|
|
81
|
-
return d.runKernel(ct, a, f);
|
|
82
|
-
}
|
|
83
|
-
const ms = /* @__PURE__ */ u({ depthToSpace_: ds });
|
|
84
|
-
function Ds(t, o, s, n, e = [1, 1], i = "NHWC") {
|
|
85
|
-
const p = h(t, "x", "dilation2d"), a = h(o, "filter", "dilation2d");
|
|
86
|
-
D(p.rank === 3 || p.rank === 4, () => `Error in dilation2d: input must be rank 3 or 4, but got rank ${p.rank}.`), D(a.rank === 3, () => `Error in dilation2d: filter must be rank 3, but got rank ${a.rank}.`), D(i === "NHWC", () => `Error in dilation2d: Only NHWC is currently supported, but got dataFormat of ${i}`);
|
|
87
|
-
let f = p, y = !1;
|
|
88
|
-
p.rank === 3 && (f = l(p, [1, p.shape[0], p.shape[1], p.shape[2]]), y = !0), D(f.shape[3] === a.shape[2], () => `Error in dilation2d: input and filter must have the same depth: ${f.shape[3]} vs ${a.shape[2]}`);
|
|
89
|
-
const c = { x: f, filter: a }, m = { strides: s, pad: n, dilations: e }, I = d.runKernel(ft, c, m);
|
|
90
|
-
return y ? l(I, [I.shape[1], I.shape[2], I.shape[3]]) : I;
|
|
91
|
-
}
|
|
92
|
-
const ys = /* @__PURE__ */ u({ dilation2d_: Ds });
|
|
93
|
-
function Is(t, o) {
|
|
94
|
-
let s = h(t, "a", "div"), n = h(o, "b", "div");
|
|
95
|
-
[s, n] = B(s, n);
|
|
96
|
-
const e = H(s, n), i = C(e), p = j(n, i);
|
|
97
|
-
return Y(p, i, e);
|
|
98
|
-
}
|
|
99
|
-
const ws = /* @__PURE__ */ u({ divNoNan_: Is });
|
|
100
|
-
function xs(t, o) {
|
|
101
|
-
const s = h(t, "t1", "dot"), n = h(o, "t2", "dot");
|
|
102
|
-
D((s.rank === 1 || s.rank === 2) && (n.rank === 1 || n.rank === 2), () => `Error in dot: inputs must all be rank 1 or 2, but got ranks ${s.rank} and ${n.rank}.`);
|
|
103
|
-
const e = s.rank === 1 ? s.size : s.shape[1], i = n.rank === 1 ? n.size : n.shape[0];
|
|
104
|
-
if (D(e === i, () => `Error in dot: inner dimensions of inputs must match, but got ${e} and ${i}.`), s.rank === 1 && n.rank === 1) {
|
|
105
|
-
const p = l(s, [1, -1]), a = l(n, [-1, 1]), f = v(p, a);
|
|
106
|
-
return l(f, []);
|
|
107
|
-
} else if (s.rank === 1 && n.rank === 2) {
|
|
108
|
-
const p = l(s, [1, -1]), a = l(n, [n.shape[0], n.shape[1]]), f = v(p, a);
|
|
109
|
-
return l(f, [f.size]);
|
|
110
|
-
} else if (s.rank === 2 && n.rank === 1) {
|
|
111
|
-
const p = l(n, [-1, 1]), a = v(s, p);
|
|
112
|
-
return l(a, [a.size]);
|
|
113
|
-
} else {
|
|
114
|
-
const p = l(n, [n.shape[0], n.shape[1]]);
|
|
115
|
-
return v(s, p);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
const gs = /* @__PURE__ */ u({ dot_: xs });
|
|
119
|
-
function $s(t, o = null, s = !1) {
|
|
120
|
-
return L(t, "euclidean", o, s);
|
|
121
|
-
}
|
|
122
|
-
const bs = /* @__PURE__ */ u({ euclideanNorm_: $s });
|
|
123
|
-
function ks(t) {
|
|
124
|
-
const s = { x: h(t, "x", "expm1") };
|
|
125
|
-
return d.runKernel(lt, s);
|
|
126
|
-
}
|
|
127
|
-
const vs = /* @__PURE__ */ u({ expm1_: ks });
|
|
128
|
-
function Ns(t) {
|
|
129
|
-
const s = { x: h(t, "x", "isFinite") };
|
|
130
|
-
return d.runKernel(dt, s);
|
|
131
|
-
}
|
|
132
|
-
const _s = /* @__PURE__ */ u({ isFinite_: Ns });
|
|
133
|
-
function Ts(t) {
|
|
134
|
-
const s = { x: h(t, "x", "isInf") };
|
|
135
|
-
return d.runKernel(mt, s);
|
|
136
|
-
}
|
|
137
|
-
const Es = /* @__PURE__ */ u({ isInf_: Ts });
|
|
138
|
-
function Ss(t) {
|
|
139
|
-
const s = { x: h(t, "x", "isNaN") };
|
|
140
|
-
return d.runKernel(Dt, s);
|
|
141
|
-
}
|
|
142
|
-
const qs = /* @__PURE__ */ u({ isNaN_: Ss });
|
|
143
|
-
function Ks(t, o = 5, s = 1, n = 1, e = 0.5) {
|
|
144
|
-
const i = h(t, "x", "localResponseNormalization");
|
|
145
|
-
D(i.rank === 4 || i.rank === 3, () => `Error in localResponseNormalization: x must be rank 3 or 4 but got
|
|
146
|
-
rank ${i.rank}.`), D(yt(o), () => `Error in localResponseNormalization: depthRadius must be an integer but got depthRadius ${o}.`);
|
|
147
|
-
let p = i, a = !1;
|
|
148
|
-
i.rank === 3 && (a = !0, p = l(i, [1, i.shape[0], i.shape[1], i.shape[2]]));
|
|
149
|
-
const f = { x: p }, y = { depthRadius: o, bias: s, alpha: n, beta: e }, c = d.runKernel(It, f, y);
|
|
150
|
-
return a ? l(c, [c.shape[1], c.shape[2], c.shape[3]]) : c;
|
|
151
|
-
}
|
|
152
|
-
const zs = /* @__PURE__ */ u({ localResponseNormalization_: Ks });
|
|
153
|
-
function Ps(t) {
|
|
154
|
-
const o = h(t, "x", "logSigmoid");
|
|
155
|
-
return wt((n) => ({ value: N(R(N(n))), gradFunc: (p) => M(p, J(N(n))) }))(o);
|
|
156
|
-
}
|
|
157
|
-
const Cs = /* @__PURE__ */ u({ logSigmoid_: Ps });
|
|
158
|
-
function Ms(t, o) {
|
|
159
|
-
const s = h(t, "a", "logicalOr", "bool"), n = h(o, "b", "logicalOr", "bool");
|
|
160
|
-
F(s.shape, n.shape);
|
|
161
|
-
const e = { a: s, b: n };
|
|
162
|
-
return d.runKernel(xt, e);
|
|
163
|
-
}
|
|
164
|
-
const tt = /* @__PURE__ */ u({ logicalOr_: Ms });
|
|
165
|
-
function Os(t, o) {
|
|
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), X(S(t, o)));
|
|
168
|
-
}
|
|
169
|
-
const As = /* @__PURE__ */ u({ logicalXor_: Os });
|
|
170
|
-
function Bs(t, o, s) {
|
|
171
|
-
D(s === "reflect" || s === "symmetric", () => `Invalid mode. Mode must be either reflect or symmetric. Got ${s}.`);
|
|
172
|
-
const n = h(t, "x", "mirrorPad");
|
|
173
|
-
if (n.rank === 0)
|
|
174
|
-
throw new Error("mirrorPad(scalar) is not defined. Pass non-scalar to mirrorPad");
|
|
175
|
-
D(o.length === n.rank, () => `Padding doesn't match input. Must be ${n.rank}. Got ${o.length}.`);
|
|
176
|
-
const e = s === "reflect" ? 1 : 0;
|
|
177
|
-
for (let a = 0; a < n.rank; a++)
|
|
178
|
-
D(o[a].length === 2, () => "Invalid number of paddings. Must be length of 2 each."), D(o[a][0] >= 0 && o[a][0] <= n.shape[a] - e && o[a][1] >= 0 && o[a][1] <= n.shape[a] - e, () => `Padding in dimension ${a} cannot be greater than or equal to ${n.shape[a] - e} or less than 0 for input of shape ${n.shape}`);
|
|
179
|
-
const i = { paddings: o, mode: s }, p = { x: n };
|
|
180
|
-
return d.runKernel(gt, p, i);
|
|
181
|
-
}
|
|
182
|
-
const Hs = /* @__PURE__ */ u({ mirrorPad_: Bs });
|
|
183
|
-
function Fs(t, o, s, n, e, i, p) {
|
|
184
|
-
e == null && (e = [1, 1]), i == null && (i = 1), n === 0 && (n = "valid");
|
|
185
|
-
const a = h(t, "x", "maxPool");
|
|
186
|
-
let f = a, y = !1;
|
|
187
|
-
a.rank === 3 && (y = !0, f = l(a, [1, a.shape[0], a.shape[1], a.shape[2]])), D(wo(i, e), () => `Error in pool: Either strides or dilations must be 1. Got strides ${i} and dilations '${e}'`);
|
|
188
|
-
const c = xo(f.shape, o, i, e, n), m = [c.dilationHeight, c.dilationWidth];
|
|
189
|
-
let I;
|
|
190
|
-
n === "same" ? I = js([c.filterHeight, c.filterWidth], m) : I = [[0, 0], [0, 0]];
|
|
191
|
-
const w = m[0] === 1 && m[1] === 1, [x, g] = Ws([c.inHeight, c.inWidth], m, I), b = w ? n : "valid", O = w ? f : G(f, m, x), A = (s === "avg" ? () => Z(O, o, i, b, p) : () => U(O, o, i, b, p))(), k = w ? A : V(A, m, g);
|
|
192
|
-
return y ? l(k, [k.shape[1], k.shape[2], k.shape[3]]) : k;
|
|
193
|
-
}
|
|
194
|
-
function Ws(t, o, s) {
|
|
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
|
-
return [f, y];
|
|
197
|
-
}
|
|
198
|
-
function js(t, o) {
|
|
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
|
-
return n.map((p, a) => [e[a], i[a]]);
|
|
201
|
-
}
|
|
202
|
-
const Rs = /* @__PURE__ */ u({ pool_: Fs });
|
|
203
|
-
function Xs(t, o = null, s = !1) {
|
|
204
|
-
let n = h(t, "x", "prod");
|
|
205
|
-
n.dtype === "bool" && (n = $(n, "int32"));
|
|
206
|
-
const e = { x: n }, i = { axis: o, keepDims: s };
|
|
207
|
-
return d.runKernel($t, e, i);
|
|
208
|
-
}
|
|
209
|
-
const Gs = /* @__PURE__ */ u({ prod_: Xs });
|
|
210
|
-
function Vs(t) {
|
|
211
|
-
const s = { x: h(t, "x", "reciprocal") };
|
|
212
|
-
return d.runKernel(bt, s);
|
|
213
|
-
}
|
|
214
|
-
const Zs = /* @__PURE__ */ u({ reciprocal_: Vs });
|
|
215
|
-
function Us(t) {
|
|
216
|
-
const s = { x: h(t, "x", "sign") };
|
|
217
|
-
return d.runKernel(kt, s);
|
|
218
|
-
}
|
|
219
|
-
const Ys = /* @__PURE__ */ u({ sign_: Us });
|
|
220
|
-
function Js(t) {
|
|
221
|
-
D(t.dtype === "complex64", () => `The dtype for tf.spectral.fft() must be complex64 but got ${t.dtype}.`);
|
|
222
|
-
const o = { input: t };
|
|
223
|
-
return d.runKernel(vt, o);
|
|
224
|
-
}
|
|
225
|
-
const ot = /* @__PURE__ */ u({ fft_: Js });
|
|
226
|
-
function Ls(t) {
|
|
227
|
-
D(t.dtype === "complex64", () => `The dtype for tf.spectral.ifft() must be complex64 but got ${t.dtype}.`);
|
|
228
|
-
const o = { input: t };
|
|
229
|
-
return d.runKernel(Nt, o);
|
|
230
|
-
}
|
|
231
|
-
const P = /* @__PURE__ */ u({ ifft_: Ls });
|
|
232
|
-
function Qs(t) {
|
|
233
|
-
const o = t.shape[t.shape.length - 1], s = t.size / o;
|
|
234
|
-
let n;
|
|
235
|
-
if (o <= 2) {
|
|
236
|
-
const e = l(t, [s, o]);
|
|
237
|
-
n = P(e);
|
|
238
|
-
} else {
|
|
239
|
-
const e = [s, 2 * (o - 1)], i = l(K(t), [s, o]), p = l(Q(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
|
-
n = P(m);
|
|
241
|
-
}
|
|
242
|
-
if (n = K(n), t.rank === 3 && t.shape[0] !== 0) {
|
|
243
|
-
const e = n, i = t.shape[0];
|
|
244
|
-
n = l(n, [i, n.shape[0] / i, n.shape[1]]), e.dispose();
|
|
245
|
-
}
|
|
246
|
-
return n;
|
|
247
|
-
}
|
|
248
|
-
const tr = /* @__PURE__ */ u({ irfft_: Qs });
|
|
249
|
-
function or(t, o) {
|
|
250
|
-
D(t.dtype === "float32", () => `The dtype for rfft() must be real value but got ${t.dtype}`);
|
|
251
|
-
let s = t.shape[t.shape.length - 1];
|
|
252
|
-
const n = t.size / s;
|
|
253
|
-
let e;
|
|
254
|
-
if (o != null && o < s) {
|
|
255
|
-
const x = t.shape.map((b) => 0), g = t.shape.map((b) => b);
|
|
256
|
-
g[t.shape.length - 1] = o, e = T(t, x, g), s = o;
|
|
257
|
-
} else if (o != null && o > s) {
|
|
258
|
-
const x = t.shape.map((g) => g);
|
|
259
|
-
x[t.shape.length - 1] = o - s, e = _([t, Ro(x)], t.shape.length - 1), s = o;
|
|
260
|
-
} else
|
|
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 = K(a), c = Q(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
|
-
return w[e.shape.length - 1] = f, l(q(m[0], I[0]), w);
|
|
264
|
-
}
|
|
265
|
-
const sr = /* @__PURE__ */ u({ rfft_: or });
|
|
266
|
-
function rr(t, o, s, n, e = 0, i = 0, p = 0, a = 0, f = 0) {
|
|
267
|
-
const c = { x: h(t, "x", "stridedSlice", "string_or_numeric") }, m = {
|
|
268
|
-
begin: o,
|
|
269
|
-
end: s,
|
|
270
|
-
strides: n,
|
|
271
|
-
beginMask: e,
|
|
272
|
-
endMask: i,
|
|
273
|
-
ellipsisMask: p,
|
|
274
|
-
newAxisMask: a,
|
|
275
|
-
shrinkAxisMask: f
|
|
276
|
-
};
|
|
277
|
-
return d.runKernel(Tt, c, m);
|
|
278
|
-
}
|
|
279
|
-
const nr = /* @__PURE__ */ u({ stridedSlice_: rr });
|
|
280
|
-
function er(t) {
|
|
281
|
-
const s = { x: h(t, "x", "tan", "float32") };
|
|
282
|
-
return d.runKernel(Et, s);
|
|
283
|
-
}
|
|
284
|
-
const ir = /* @__PURE__ */ u({ tan_: er });
|
|
285
|
-
function pr(t, o = 1, s = !0) {
|
|
286
|
-
const n = h(t, "x", "topk");
|
|
287
|
-
if (n.rank === 0)
|
|
288
|
-
throw new Error("topk() expects the input to be of rank 1 or higher");
|
|
289
|
-
const e = n.shape[n.shape.length - 1];
|
|
290
|
-
if (o < 0)
|
|
291
|
-
throw new Error(`'k' passed to topk() must be >= 0 but got ${o}`);
|
|
292
|
-
if (o > e)
|
|
293
|
-
throw new Error(`'k' passed to topk() must be <= the last dimension (${e}) but got ${o}`);
|
|
294
|
-
const i = { x: n }, p = { k: o, sorted: s }, [a, f] = d.runKernel(St, i, p);
|
|
295
|
-
return { values: a, indices: f };
|
|
296
|
-
}
|
|
297
|
-
const ar = /* @__PURE__ */ u({ topk_: pr });
|
|
298
|
-
function hr(t, o = 0) {
|
|
299
|
-
const s = h(t, "x", "unique", "string_or_numeric");
|
|
300
|
-
D(s.rank > 0, () => "The input tensor must be at least 1D");
|
|
301
|
-
const n = { x: s }, e = { axis: o }, [i, p] = d.runKernel(qt, n, e);
|
|
302
|
-
return { values: i, indices: p };
|
|
303
|
-
}
|
|
304
|
-
const ur = /* @__PURE__ */ u({ unique_: hr });
|
|
305
|
-
r().prototype.abs = function() {
|
|
306
|
-
return this.throwIfDisposed(), Kt(this);
|
|
307
|
-
};
|
|
308
|
-
r().prototype.acos = function() {
|
|
309
|
-
return this.throwIfDisposed(), Jo(this);
|
|
310
|
-
};
|
|
311
|
-
r().prototype.acosh = function() {
|
|
312
|
-
return this.throwIfDisposed(), Qo(this);
|
|
313
|
-
};
|
|
314
|
-
r().prototype.add = function(t) {
|
|
315
|
-
return this.throwIfDisposed(), zt(this, t);
|
|
316
|
-
};
|
|
317
|
-
r().prototype.all = function(t, o) {
|
|
318
|
-
return this.throwIfDisposed(), Ht(this, t, o);
|
|
319
|
-
};
|
|
320
|
-
r().prototype.any = function(t, o) {
|
|
321
|
-
return this.throwIfDisposed(), Ft(this, t, o);
|
|
322
|
-
};
|
|
323
|
-
r().prototype.argMax = function(t) {
|
|
324
|
-
return this.throwIfDisposed(), Wt(this, t);
|
|
325
|
-
};
|
|
326
|
-
r().prototype.argMin = function(t) {
|
|
327
|
-
return this.throwIfDisposed(), os(this, t);
|
|
328
|
-
};
|
|
329
|
-
r().prototype.asScalar = function() {
|
|
330
|
-
return this.throwIfDisposed(), D(this.size === 1, () => "The array must have only 1 element."), l(this, []);
|
|
331
|
-
};
|
|
332
|
-
r().prototype.asType = function(t) {
|
|
333
|
-
return this.throwIfDisposed(), $(this, t);
|
|
334
|
-
};
|
|
335
|
-
r().prototype.as1D = function() {
|
|
336
|
-
return this.throwIfDisposed(), l(this, [this.size]);
|
|
337
|
-
};
|
|
338
|
-
r().prototype.as2D = function(t, o) {
|
|
339
|
-
return this.throwIfDisposed(), l(this, [t, o]);
|
|
340
|
-
};
|
|
341
|
-
r().prototype.as3D = function(t, o, s) {
|
|
342
|
-
return this.throwIfDisposed(), l(this, [t, o, s]);
|
|
343
|
-
};
|
|
344
|
-
r().prototype.as4D = function(t, o, s, n) {
|
|
345
|
-
return this.throwIfDisposed(), l(this, [t, o, s, n]);
|
|
346
|
-
};
|
|
347
|
-
r().prototype.as5D = function(t, o, s, n, e) {
|
|
348
|
-
return this.throwIfDisposed(), l(this, [t, o, s, n, e]);
|
|
349
|
-
};
|
|
350
|
-
r().prototype.asin = function() {
|
|
351
|
-
return this.throwIfDisposed(), rs(this);
|
|
352
|
-
};
|
|
353
|
-
r().prototype.asinh = function() {
|
|
354
|
-
return this.throwIfDisposed(), es(this);
|
|
355
|
-
};
|
|
356
|
-
r().prototype.atan = function() {
|
|
357
|
-
return this.throwIfDisposed(), ps(this);
|
|
358
|
-
};
|
|
359
|
-
r().prototype.atan2 = function(t) {
|
|
360
|
-
return this.throwIfDisposed(), hs(this, t);
|
|
361
|
-
};
|
|
362
|
-
r().prototype.atanh = function() {
|
|
363
|
-
return this.throwIfDisposed(), cs(this);
|
|
364
|
-
};
|
|
365
|
-
r().prototype.avgPool = function(t, o, s, n) {
|
|
366
|
-
return this.throwIfDisposed(), Z(this, t, o, s, n);
|
|
367
|
-
};
|
|
368
|
-
r().prototype.batchToSpaceND = function(t, o) {
|
|
369
|
-
return this.throwIfDisposed(), V(this, t, o);
|
|
370
|
-
};
|
|
371
|
-
r().prototype.batchNorm = function(t, o, s, n, e) {
|
|
372
|
-
return this.throwIfDisposed(), jt(this, t, o, s, n, e);
|
|
373
|
-
};
|
|
374
|
-
r().prototype.broadcastTo = function(t) {
|
|
375
|
-
return this.throwIfDisposed(), uo(this, t);
|
|
376
|
-
};
|
|
377
|
-
r().prototype.cast = function(t) {
|
|
378
|
-
return this.throwIfDisposed(), $(this, t);
|
|
379
|
-
};
|
|
380
|
-
r().prototype.ceil = function() {
|
|
381
|
-
return this.throwIfDisposed(), ls(this);
|
|
382
|
-
};
|
|
383
|
-
r().prototype.clipByValue = function(t, o) {
|
|
384
|
-
return this.throwIfDisposed(), co(this, t, o);
|
|
385
|
-
};
|
|
386
|
-
r().prototype.concat = function(t, o) {
|
|
387
|
-
return this.throwIfDisposed(), t instanceof W && (t = [t]), _([this, ...t], o);
|
|
388
|
-
};
|
|
389
|
-
r().prototype.conv1d = function(t, o, s, n, e, i) {
|
|
390
|
-
return this.throwIfDisposed(), Rt(this, t, o, s, n, e, i);
|
|
391
|
-
};
|
|
392
|
-
r().prototype.conv2dTranspose = function(t, o, s, n, e) {
|
|
393
|
-
return this.throwIfDisposed(), Xt(this, t, o, s, n, e);
|
|
394
|
-
};
|
|
395
|
-
r().prototype.conv2d = function(t, o, s, n, e, i) {
|
|
396
|
-
return this.throwIfDisposed(), Gt(this, t, o, s, n, e, i);
|
|
397
|
-
};
|
|
398
|
-
r().prototype.cos = function() {
|
|
399
|
-
return this.throwIfDisposed(), Vt(this);
|
|
400
|
-
};
|
|
401
|
-
r().prototype.cosh = function() {
|
|
402
|
-
return this.throwIfDisposed(), Zt(this);
|
|
403
|
-
};
|
|
404
|
-
r().prototype.cumprod = function(t, o, s) {
|
|
405
|
-
return this.throwIfDisposed(), Ut(this, t, o, s);
|
|
406
|
-
};
|
|
407
|
-
r().prototype.cumsum = function(t, o, s) {
|
|
408
|
-
return this.throwIfDisposed(), Yt(this, t, o, s);
|
|
409
|
-
};
|
|
410
|
-
r().prototype.depthToSpace = function(t, o) {
|
|
411
|
-
return this.throwIfDisposed(), ms(this, t, o);
|
|
412
|
-
};
|
|
413
|
-
r().prototype.depthwiseConv2d = function(t, o, s, n, e, i) {
|
|
414
|
-
return this.throwIfDisposed(), Jt(this, t, o, s, n, e, i);
|
|
415
|
-
};
|
|
416
|
-
r().prototype.dilation2d = function(t, o, s, n, e) {
|
|
417
|
-
return this.throwIfDisposed(), ys(this, t, o, s, n, e);
|
|
418
|
-
};
|
|
419
|
-
r().prototype.divNoNan = function(t) {
|
|
420
|
-
return this.throwIfDisposed(), ws(this, t);
|
|
421
|
-
};
|
|
422
|
-
r().prototype.div = function(t) {
|
|
423
|
-
return this.throwIfDisposed(), H(this, t);
|
|
424
|
-
};
|
|
425
|
-
r().prototype.dot = function(t) {
|
|
426
|
-
return this.throwIfDisposed(), gs(this, t);
|
|
427
|
-
};
|
|
428
|
-
r().prototype.elu = function() {
|
|
429
|
-
return this.throwIfDisposed(), go(this);
|
|
430
|
-
};
|
|
431
|
-
r().prototype.equal = function(t) {
|
|
432
|
-
return this.throwIfDisposed(), j(this, t);
|
|
433
|
-
};
|
|
434
|
-
r().prototype.erf = function() {
|
|
435
|
-
return this.throwIfDisposed(), Lt(this);
|
|
436
|
-
};
|
|
437
|
-
r().prototype.euclideanNorm = function(t, o) {
|
|
438
|
-
return this.throwIfDisposed(), bs(this, t, o);
|
|
439
|
-
};
|
|
440
|
-
r().prototype.exp = function() {
|
|
441
|
-
return this.throwIfDisposed(), fo(this);
|
|
442
|
-
};
|
|
443
|
-
r().prototype.expandDims = function(t) {
|
|
444
|
-
return this.throwIfDisposed(), Ao(this, t);
|
|
445
|
-
};
|
|
446
|
-
r().prototype.expm1 = function() {
|
|
447
|
-
return this.throwIfDisposed(), vs(this);
|
|
448
|
-
};
|
|
449
|
-
r().prototype.fft = function() {
|
|
450
|
-
return this.throwIfDisposed(), ot(this);
|
|
451
|
-
};
|
|
452
|
-
r().prototype.flatten = function() {
|
|
453
|
-
return this.throwIfDisposed(), l(this, [this.size]);
|
|
454
|
-
};
|
|
455
|
-
r().prototype.floor = function() {
|
|
456
|
-
return this.throwIfDisposed(), Bo(this);
|
|
457
|
-
};
|
|
458
|
-
r().prototype.floorDiv = function(t) {
|
|
459
|
-
return this.throwIfDisposed(), Pt(this, t);
|
|
460
|
-
};
|
|
461
|
-
r().prototype.gather = function(t, o, s) {
|
|
462
|
-
return this.throwIfDisposed(), Ho(this, t, o, s);
|
|
463
|
-
};
|
|
464
|
-
r().prototype.greaterEqual = function(t) {
|
|
465
|
-
return this.throwIfDisposed(), No(this, t);
|
|
466
|
-
};
|
|
467
|
-
r().prototype.greater = function(t) {
|
|
468
|
-
return this.throwIfDisposed(), _o(this, t);
|
|
469
|
-
};
|
|
470
|
-
r().prototype.ifft = function() {
|
|
471
|
-
return this.throwIfDisposed(), P(this);
|
|
472
|
-
};
|
|
473
|
-
r().prototype.irfft = function() {
|
|
474
|
-
return this.throwIfDisposed(), tr(this);
|
|
475
|
-
};
|
|
476
|
-
r().prototype.isFinite = function() {
|
|
477
|
-
return this.throwIfDisposed(), _s(this);
|
|
478
|
-
};
|
|
479
|
-
r().prototype.isInf = function() {
|
|
480
|
-
return this.throwIfDisposed(), Es(this);
|
|
481
|
-
};
|
|
482
|
-
r().prototype.isNaN = function() {
|
|
483
|
-
return this.throwIfDisposed(), qs(this);
|
|
484
|
-
};
|
|
485
|
-
r().prototype.leakyRelu = function(t) {
|
|
486
|
-
return this.throwIfDisposed(), $o(this, t);
|
|
487
|
-
};
|
|
488
|
-
r().prototype.lessEqual = function(t) {
|
|
489
|
-
return this.throwIfDisposed(), To(this, t);
|
|
490
|
-
};
|
|
491
|
-
r().prototype.less = function(t) {
|
|
492
|
-
return this.throwIfDisposed(), Eo(this, t);
|
|
493
|
-
};
|
|
494
|
-
r().prototype.localResponseNormalization = function(t, o, s, n) {
|
|
495
|
-
return this.throwIfDisposed(), zs(this, t, o, s, n);
|
|
496
|
-
};
|
|
497
|
-
r().prototype.logSigmoid = function() {
|
|
498
|
-
return this.throwIfDisposed(), Cs(this);
|
|
499
|
-
};
|
|
500
|
-
r().prototype.logSoftmax = function(t) {
|
|
501
|
-
return this.throwIfDisposed(), Qt(this, t);
|
|
502
|
-
};
|
|
503
|
-
r().prototype.logSumExp = function(t, o) {
|
|
504
|
-
return this.throwIfDisposed(), lo(this, t, o);
|
|
505
|
-
};
|
|
506
|
-
r().prototype.log = function() {
|
|
507
|
-
return this.throwIfDisposed(), mo(this);
|
|
508
|
-
};
|
|
509
|
-
r().prototype.log1p = function() {
|
|
510
|
-
return this.throwIfDisposed(), So(this);
|
|
511
|
-
};
|
|
512
|
-
r().prototype.logicalAnd = function(t) {
|
|
513
|
-
return this.throwIfDisposed(), S(this, t);
|
|
514
|
-
};
|
|
515
|
-
r().prototype.logicalNot = function() {
|
|
516
|
-
return this.throwIfDisposed(), X(this);
|
|
517
|
-
};
|
|
518
|
-
r().prototype.logicalOr = function(t) {
|
|
519
|
-
return this.throwIfDisposed(), tt(this, t);
|
|
520
|
-
};
|
|
521
|
-
r().prototype.logicalXor = function(t) {
|
|
522
|
-
return this.throwIfDisposed(), As(this, t);
|
|
523
|
-
};
|
|
524
|
-
r().prototype.matMul = function(t, o, s) {
|
|
525
|
-
return this.throwIfDisposed(), v(this, t, o, s);
|
|
526
|
-
};
|
|
527
|
-
r().prototype.maxPool = function(t, o, s, n) {
|
|
528
|
-
return this.throwIfDisposed(), U(this, t, o, s, n);
|
|
529
|
-
};
|
|
530
|
-
r().prototype.max = function(t, o) {
|
|
531
|
-
return this.throwIfDisposed(), Do(this, t, o);
|
|
532
|
-
};
|
|
533
|
-
r().prototype.maximum = function(t) {
|
|
534
|
-
return this.throwIfDisposed(), Ct(this, t);
|
|
535
|
-
};
|
|
536
|
-
r().prototype.mean = function(t, o) {
|
|
537
|
-
return this.throwIfDisposed(), yo(this, t, o);
|
|
538
|
-
};
|
|
539
|
-
r().prototype.min = function(t, o) {
|
|
540
|
-
return this.throwIfDisposed(), qo(this, t, o);
|
|
541
|
-
};
|
|
542
|
-
r().prototype.minimum = function(t) {
|
|
543
|
-
return this.throwIfDisposed(), Ko(this, t);
|
|
544
|
-
};
|
|
545
|
-
r().prototype.mirrorPad = function(t, o) {
|
|
546
|
-
return this.throwIfDisposed(), Hs(this, t, o);
|
|
547
|
-
};
|
|
548
|
-
r().prototype.mod = function(t) {
|
|
549
|
-
return this.throwIfDisposed(), Wo(this, t);
|
|
550
|
-
};
|
|
551
|
-
r().prototype.mul = function(t) {
|
|
552
|
-
return this.throwIfDisposed(), M(this, t);
|
|
553
|
-
};
|
|
554
|
-
r().prototype.neg = function() {
|
|
555
|
-
return this.throwIfDisposed(), N(this);
|
|
556
|
-
};
|
|
557
|
-
r().prototype.norm = function(t, o, s) {
|
|
558
|
-
return this.throwIfDisposed(), L(this, t, o, s);
|
|
559
|
-
};
|
|
560
|
-
r().prototype.notEqual = function(t) {
|
|
561
|
-
return this.throwIfDisposed(), Io(this, t);
|
|
562
|
-
};
|
|
563
|
-
r().prototype.oneHot = function(t, o = 1, s = 0) {
|
|
564
|
-
return this.throwIfDisposed(), to(this, t, o, s);
|
|
565
|
-
};
|
|
566
|
-
r().prototype.onesLike = function() {
|
|
567
|
-
return this.throwIfDisposed(), oo(this);
|
|
568
|
-
};
|
|
569
|
-
r().prototype.pad = function(t, o) {
|
|
570
|
-
return this.throwIfDisposed(), so(this, t, o);
|
|
571
|
-
};
|
|
572
|
-
r().prototype.pool = function(t, o, s, n, e, i) {
|
|
573
|
-
return this.throwIfDisposed(), Rs(this, t, o, s, n, e, i);
|
|
574
|
-
};
|
|
575
|
-
r().prototype.pow = function(t) {
|
|
576
|
-
return this.throwIfDisposed(), Mt(this, t);
|
|
577
|
-
};
|
|
578
|
-
r().prototype.prelu = function(t) {
|
|
579
|
-
return this.throwIfDisposed(), bo(this, t);
|
|
580
|
-
};
|
|
581
|
-
r().prototype.prod = function(t, o) {
|
|
582
|
-
return this.throwIfDisposed(), Gs(this, t, o);
|
|
583
|
-
};
|
|
584
|
-
r().prototype.reciprocal = function() {
|
|
585
|
-
return this.throwIfDisposed(), Zs(this);
|
|
586
|
-
};
|
|
587
|
-
r().prototype.relu = function() {
|
|
588
|
-
return this.throwIfDisposed(), jo(this);
|
|
589
|
-
};
|
|
590
|
-
r().prototype.relu6 = function() {
|
|
591
|
-
return this.throwIfDisposed(), ko(this);
|
|
592
|
-
};
|
|
593
|
-
r().prototype.reshapeAs = function(t) {
|
|
594
|
-
return this.throwIfDisposed(), l(this, t.shape);
|
|
595
|
-
};
|
|
596
|
-
r().prototype.reshape = function(t) {
|
|
597
|
-
return this.throwIfDisposed(), l(this, t);
|
|
598
|
-
};
|
|
599
|
-
r().prototype.resizeBilinear = function(t, o, s) {
|
|
600
|
-
return this.throwIfDisposed(), zo(this, t, o, s);
|
|
601
|
-
};
|
|
602
|
-
r().prototype.resizeNearestNeighbor = function(t, o, s) {
|
|
603
|
-
return this.throwIfDisposed(), Po(this, t, o, s);
|
|
604
|
-
};
|
|
605
|
-
r().prototype.reverse = function(t) {
|
|
606
|
-
return this.throwIfDisposed(), E(this, t);
|
|
607
|
-
};
|
|
608
|
-
r().prototype.rfft = function() {
|
|
609
|
-
return this.throwIfDisposed(), sr(this);
|
|
610
|
-
};
|
|
611
|
-
r().prototype.round = function() {
|
|
612
|
-
return this.throwIfDisposed(), Co(this);
|
|
613
|
-
};
|
|
614
|
-
r().prototype.rsqrt = function() {
|
|
615
|
-
return this.throwIfDisposed(), ro(this);
|
|
616
|
-
};
|
|
617
|
-
r().prototype.selu = function() {
|
|
618
|
-
return this.throwIfDisposed(), no(this);
|
|
619
|
-
};
|
|
620
|
-
r().prototype.separableConv2d = function(t, o, s, n, e, i) {
|
|
621
|
-
return this.throwIfDisposed(), eo(this, t, o, s, n, e, i);
|
|
622
|
-
};
|
|
623
|
-
r().prototype.sigmoid = function() {
|
|
624
|
-
return this.throwIfDisposed(), J(this);
|
|
625
|
-
};
|
|
626
|
-
r().prototype.sign = function() {
|
|
627
|
-
return this.throwIfDisposed(), Ys(this);
|
|
628
|
-
};
|
|
629
|
-
r().prototype.sin = function() {
|
|
630
|
-
return this.throwIfDisposed(), io(this);
|
|
631
|
-
};
|
|
632
|
-
r().prototype.sinh = function() {
|
|
633
|
-
return this.throwIfDisposed(), po(this);
|
|
634
|
-
};
|
|
635
|
-
r().prototype.slice = function(t, o) {
|
|
636
|
-
return this.throwIfDisposed(), T(this, t, o);
|
|
637
|
-
};
|
|
638
|
-
r().prototype.softmax = function(t) {
|
|
639
|
-
return this.throwIfDisposed(), Xo(this, t);
|
|
640
|
-
};
|
|
641
|
-
r().prototype.softplus = function() {
|
|
642
|
-
return this.throwIfDisposed(), R(this);
|
|
643
|
-
};
|
|
644
|
-
r().prototype.spaceToBatchND = function(t, o) {
|
|
645
|
-
return this.throwIfDisposed(), G(this, t, o);
|
|
646
|
-
};
|
|
647
|
-
r().prototype.split = function(t, o) {
|
|
648
|
-
return this.throwIfDisposed(), z(this, t, o);
|
|
649
|
-
};
|
|
650
|
-
r().prototype.sqrt = function() {
|
|
651
|
-
return this.throwIfDisposed(), Ot(this);
|
|
652
|
-
};
|
|
653
|
-
r().prototype.square = function() {
|
|
654
|
-
return this.throwIfDisposed(), At(this);
|
|
655
|
-
};
|
|
656
|
-
r().prototype.squaredDifference = function(t) {
|
|
657
|
-
return this.throwIfDisposed(), Mo(this, t);
|
|
658
|
-
};
|
|
659
|
-
r().prototype.squeeze = function(t) {
|
|
660
|
-
return this.throwIfDisposed(), Go(this, t);
|
|
661
|
-
};
|
|
662
|
-
r().prototype.stack = function(t, o) {
|
|
663
|
-
this.throwIfDisposed();
|
|
664
|
-
const s = t instanceof W ? [this, t] : [this, ...t];
|
|
665
|
-
return Vo(s, o);
|
|
666
|
-
};
|
|
667
|
-
r().prototype.step = function(t) {
|
|
668
|
-
return this.throwIfDisposed(), vo(this, t);
|
|
669
|
-
};
|
|
670
|
-
r().prototype.stridedSlice = function(t, o, s, n, e, i, p, a) {
|
|
671
|
-
return this.throwIfDisposed(), nr(this, t, o, s, n, e, i, p, a);
|
|
672
|
-
};
|
|
673
|
-
r().prototype.sub = function(t) {
|
|
674
|
-
return this.throwIfDisposed(), Bt(this, t);
|
|
675
|
-
};
|
|
676
|
-
r().prototype.sum = function(t, o) {
|
|
677
|
-
return this.throwIfDisposed(), Zo(this, t, o);
|
|
678
|
-
};
|
|
679
|
-
r().prototype.tan = function() {
|
|
680
|
-
return this.throwIfDisposed(), ir(this);
|
|
681
|
-
};
|
|
682
|
-
r().prototype.tanh = function() {
|
|
683
|
-
return this.throwIfDisposed(), ao(this);
|
|
684
|
-
};
|
|
685
|
-
r().prototype.tile = function(t) {
|
|
686
|
-
return this.throwIfDisposed(), Uo(this, t);
|
|
687
|
-
};
|
|
688
|
-
r().prototype.toBool = function() {
|
|
689
|
-
return this.throwIfDisposed(), $(this, "bool");
|
|
690
|
-
};
|
|
691
|
-
r().prototype.toFloat = function() {
|
|
692
|
-
return this.throwIfDisposed(), $(this, "float32");
|
|
693
|
-
};
|
|
694
|
-
r().prototype.toInt = function() {
|
|
695
|
-
return this.throwIfDisposed(), $(this, "int32");
|
|
696
|
-
};
|
|
697
|
-
r().prototype.topk = function(t, o) {
|
|
698
|
-
return this.throwIfDisposed(), ar(this, t, o);
|
|
699
|
-
};
|
|
700
|
-
r().prototype.transpose = function(t) {
|
|
701
|
-
return this.throwIfDisposed(), Fo(this, t);
|
|
702
|
-
};
|
|
703
|
-
r().prototype.unique = function(t) {
|
|
704
|
-
return this.throwIfDisposed(), ur(this, t);
|
|
705
|
-
};
|
|
706
|
-
r().prototype.unsortedSegmentSum = function(t, o) {
|
|
707
|
-
return this.throwIfDisposed(), ho(this, t, o);
|
|
708
|
-
};
|
|
709
|
-
r().prototype.unstack = function(t) {
|
|
710
|
-
return this.throwIfDisposed(), Oo(this, t);
|
|
711
|
-
};
|
|
712
|
-
r().prototype.where = function(t, o) {
|
|
713
|
-
return this.throwIfDisposed(), Y(t, this, o);
|
|
714
|
-
};
|
|
715
|
-
r().prototype.zerosLike = function() {
|
|
716
|
-
return this.throwIfDisposed(), C(this);
|
|
717
|
-
};
|
|
718
|
-
export {
|
|
719
|
-
Zs as r,
|
|
720
|
-
ar as t
|
|
721
|
-
};
|