|
| | Module_REG (TF) |
| |
| | TF () |
| | Tf.
|
| |
| | ~TF () override=default |
| | Tf.
|
| |
| Func * | func () |
| | Func.
|
| |
| void | pushTrace (Func *f) |
| | Pushes trace.
|
| |
| void | popTrace (Func *f) |
| | Pops trace.
|
| |
| Func * | tracing () const |
| | Tracing.
|
| |
| Tensor * | zeros1 (int d0) |
| | Zeros 1.
|
| |
| Tensor * | zeros2 (int d0, int d1) |
| | Zeros 2.
|
| |
| Tensor * | zeros3 (int d0, int d1, int d2) |
| | Zeros 3.
|
| |
| Tensor * | zeros4 (int d0, int d1, int d2, int d3) |
| | Zeros 4.
|
| |
| Tensor * | zeros5 (int d0, int d1, int d2, int d3, int d4) |
| | Zeros 5.
|
| |
| Tensor * | zeros6 (int d0, int d1, int d2, int d3, int d4, int d5) |
| | Zeros 6.
|
| |
| Tensor * | ones1 (int d0) |
| | Ones 1.
|
| |
| Tensor * | ones2 (int d0, int d1) |
| | Ones 2.
|
| |
| Tensor * | ones3 (int d0, int d1, int d2) |
| | Ones 3.
|
| |
| Tensor * | ones4 (int d0, int d1, int d2, int d3) |
| | Ones 4.
|
| |
| Tensor * | ones5 (int d0, int d1, int d2, int d3, int d4) |
| | Ones 5.
|
| |
| Tensor * | ones6 (int d0, int d1, int d2, int d3, int d4, int d5) |
| | Ones 6.
|
| |
| Tensor * | fill1 (int d0, float value) |
| | Fill 1.
|
| |
| Tensor * | fill2 (int d0, int d1, float value) |
| | Fill 2.
|
| |
| Tensor * | fill3 (int d0, int d1, int d2, float value) |
| | Fill 3.
|
| |
| Tensor * | fill4 (int d0, int d1, int d2, int d3, float value) |
| | Fill 4.
|
| |
| Tensor * | constantScalar (float value) |
| | Constant scalar.
|
| |
| Tensor * | arange (int n) |
| | Arange.
|
| |
| Tensor * | linspace (float start, float end, int n) |
| | Linspace.
|
| |
| Tensor * | eye (int n) |
| | Eye.
|
| |
| Tensor * | randomUniform1 (int d0) |
| | Random uniform 1.
|
| |
| Tensor * | randomUniform2 (int d0, int d1) |
| | Random uniform 2.
|
| |
| Tensor * | randomUniform3 (int d0, int d1, int d2) |
| | Random uniform 3.
|
| |
| Tensor * | randomUniform4 (int d0, int d1, int d2, int d3) |
| | Random uniform 4.
|
| |
| Tensor * | randomNormal1 (int d0) |
| | Random normal 1.
|
| |
| Tensor * | randomNormal2 (int d0, int d1) |
| | Random normal 2.
|
| |
| Tensor * | randomNormal3 (int d0, int d1, int d2) |
| | Random normal 3.
|
| |
| Tensor * | randomNormal4 (int d0, int d1, int d2, int d3) |
| | Random normal 4.
|
| |
| Tensor * | rand1 (int d0) |
| | Rand 1.
|
| |
| Tensor * | rand2 (int d0, int d1) |
| | Rand 2.
|
| |
| Tensor * | rand3 (int d0, int d1, int d2) |
| | Rand 3.
|
| |
| Tensor * | rand4 (int d0, int d1, int d2, int d3) |
| | Rand 4.
|
| |
| Tensor * | randn1 (int d0) |
| | Randn 1.
|
| |
| Tensor * | randn2 (int d0, int d1) |
| | Randn 2.
|
| |
| Tensor * | randn3 (int d0, int d1, int d2) |
| | Randn 3.
|
| |
| Tensor * | randn4 (int d0, int d1, int d2, int d3) |
| | Randn 4.
|
| |
| void | setRandomSeed (uint32_t seed) |
| | Sets the random seed.
|
| |
| uint32_t | getRandomSeed () const |
| | Returns the random seed.
|
| |
| Tensor * | add (Tensor *a, Tensor *b) |
| | Adds add.
|
| |
| Tensor * | sub (Tensor *a, Tensor *b) |
| | Sub.
|
| |
| Tensor * | multiply (Tensor *a, Tensor *b) |
| | Multiply.
|
| |
| Tensor * | div (Tensor *a, Tensor *b) |
| | Div.
|
| |
| Tensor * | addScalar (Tensor *a, float s) |
| | Adds scalar.
|
| |
| Tensor * | subScalar (Tensor *a, float s) |
| | Sub scalar.
|
| |
| Tensor * | mulScalar (Tensor *a, float s) |
| | Mul scalar.
|
| |
| Tensor * | divScalar (Tensor *a, float s) |
| | Div scalar.
|
| |
| Tensor * | neg (Tensor *a) |
| | Neg.
|
| |
| Tensor * | abs (Tensor *a) |
| | Abs.
|
| |
| Tensor * | sqrt (Tensor *a) |
| | Sqrt.
|
| |
| Tensor * | exp (Tensor *a) |
| | Exp.
|
| |
| Tensor * | log (Tensor *a) |
| | Log.
|
| |
| Tensor * | sin (Tensor *a) |
| | Sin.
|
| |
| Tensor * | cos (Tensor *a) |
| | Cos.
|
| |
| Tensor * | tanh (Tensor *a) |
| | Tanh.
|
| |
| Tensor * | relu (Tensor *a) |
| | Relu.
|
| |
| Tensor * | sigmoid (Tensor *a) |
| | Sigmoid.
|
| |
| Tensor * | gelu (Tensor *a) |
| | Gelu.
|
| |
| Tensor * | silu (Tensor *a) |
| | Silu.
|
| |
| Tensor * | powScalar (Tensor *a, float exp) |
| | Pow scalar.
|
| |
| Tensor * | clamp (Tensor *a, float lo, float hi) |
| | Clamp.
|
| |
| Tensor * | maximumScalar (Tensor *a, float s) |
| | Maximum scalar.
|
| |
| Tensor * | minimumScalar (Tensor *a, float s) |
| | Minimum scalar.
|
| |
| Tensor * | matmul (Tensor *a, Tensor *b) |
| | Matmul.
|
| |
| Tensor * | transpose (Tensor *a) |
| | Transpose.
|
| |
| Tensor * | permute2 (Tensor *a, int a0, int a1) |
| | Permute 2.
|
| |
| Tensor * | permute3 (Tensor *a, int a0, int a1, int a2) |
| | Permute 3.
|
| |
| Tensor * | permute4 (Tensor *a, int a0, int a1, int a2, int a3) |
| | Permute 4.
|
| |
| Tensor * | permute5 (Tensor *a, int a0, int a1, int a2, int a3, int a4) |
| | Permute 5.
|
| |
| Tensor * | permute6 (Tensor *a, int a0, int a1, int a2, int a3, int a4, int a5) |
| | Permute 6.
|
| |
| Tensor * | reshape1 (Tensor *a, int d0) |
| | Reshape 1.
|
| |
| Tensor * | reshape2 (Tensor *a, int d0, int d1) |
| | Reshape 2.
|
| |
| Tensor * | reshape3 (Tensor *a, int d0, int d1, int d2) |
| | Reshape 3.
|
| |
| Tensor * | reshape4 (Tensor *a, int d0, int d1, int d2, int d3) |
| | Reshape 4.
|
| |
| Tensor * | reshape5 (Tensor *a, int d0, int d1, int d2, int d3, int d4) |
| | Reshape 5.
|
| |
| Tensor * | reshape6 (Tensor *a, int d0, int d1, int d2, int d3, int d4, int d5) |
| | Reshape 6.
|
| |
| Tensor * | flatten (Tensor *a) |
| | Flatten.
|
| |
| Tensor * | where (Tensor *cond, Tensor *a, Tensor *b) |
| | Where.
|
| |
| Tensor * | concatN (Tensor *const *ins, int n, int axis) |
| | Concat n.
|
| |
| Tensor * | softmax (Tensor *a, int axis) |
| | Softmax.
|
| |
| Tensor * | logSoftmax (Tensor *a, int axis) |
| | Log softmax.
|
| |
| Tensor * | layernorm (Tensor *a, float eps) |
| | Layernorm.
|
| |
| Tensor * | layernormWB (Tensor *a, Tensor *scale, Tensor *bias, float eps) |
| | Layernorm wb.
|
| |
| Tensor * | rmsnorm (Tensor *a, float eps) |
| | Rmsnorm.
|
| |
| Tensor * | rmsnormW (Tensor *a, Tensor *scale, float eps) |
| | Rmsnorm w.
|
| |
| Tensor * | conv1d (Tensor *x, Tensor *w, int stride, int pad) |
| | Conv 1 d.
|
| |
| Tensor * | conv1dBias (Tensor *x, Tensor *w, Tensor *bias, int stride, int pad) |
| | Conv 1 d bias.
|
| |
| Tensor * | conv2d (Tensor *x, Tensor *w, int stride, int pad) |
| | Conv 2 d.
|
| |
| Tensor * | conv2dBias (Tensor *x, Tensor *w, Tensor *bias, int stride, int pad) |
| | Conv 2 d bias.
|
| |
| Tensor * | maxpool2d (Tensor *x, int ksize, int stride, int pad) |
| | Maxpool 2 d.
|
| |
| Tensor * | avgpool2d (Tensor *x, int ksize, int stride, int pad) |
| | Avgpool 2 d.
|
| |
| Tensor * | embedding (Tensor *table, Tensor *indices) |
| | Embedding.
|
| |
| Tensor * | concat2 (Tensor *a, Tensor *b, int axis) |
| | Concat 2.
|
| |
| Tensor * | concat3 (Tensor *a, Tensor *b, Tensor *c, int axis) |
| | Concat 3.
|
| |
| Tensor * | concat4 (Tensor *a, Tensor *b, Tensor *c, Tensor *d, int axis) |
| | Concat 4.
|
| |
| Tensor * | slice (Tensor *a, int axis, int begin, int end) |
| | Slice.
|
| |
| Tensor * | sumAxis (Tensor *a, int axis, int keepDims) |
| | Sum axis.
|
| |
| Tensor * | meanAxis (Tensor *a, int axis, int keepDims) |
| | Mean axis.
|
| |
| Tensor * | minAxis (Tensor *a, int axis, int keepDims) |
| | Min axis.
|
| |
| Tensor * | maxAxis (Tensor *a, int axis, int keepDims) |
| | Max axis.
|
| |
| Tensor * | argmax (Tensor *a, int axis, int keepDims) |
| | Argmax.
|
| |
| Tensor * | cast (Tensor *a, const std::string &dtype) |
| | Cast.
|
| |
| Tensor * | sdpa (Tensor *q, Tensor *k, Tensor *v, float scale) |
| | Sdpa.
|
| |
| Tensor * | sdpaMasked (Tensor *q, Tensor *k, Tensor *v, Tensor *mask, float scale) |
| | Sdpa masked.
|
| |
| Tensor * | resize2d (Tensor *a, int outW, int outH, int mode) |
| | Resize 2 d.
|
| |
| Tensor * | quantizeWeight (Tensor *a, const std::string &dtype, int group=0) |
| | Quantize weight.
|
| |
| float | reduceSum (Tensor *a) |
| | Reduce sum.
|
| |
| float | reduceMean (Tensor *a) |
| | Reduce mean.
|
| |
| float | reduceMin (Tensor *a) |
| | Reduce min.
|
| |
| float | reduceMax (Tensor *a) |
| | Reduce max.
|
| |
| virtual | ~Module () |
| | Module.
|
| |
| virtual std::string | getName () const =0 |
| | Returns the name.
|
| |
TF2-like namespace module. Script: tf <- eve.TF(); Default eager; tf.func() traces a graph for compile/run.
在文件 TF.h 第 20 行定义.