|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452 |
-
- * [AbsVal](#absval)
- * [ArgMax](#argmax)
- * [BatchNorm](#batchnorm)
- * [Bias](#bias)
- * [BinaryOp](#binaryop)
- * [BNLL](#bnll)
- * [Cast](#cast)
- * [Clip](#clip)
- * [Concat](#concat)
- * [Convolution](#convolution)
- * [Convolution1D](#convolution1d)
- * [Convolution3D](#convolution3d)
- * [ConvolutionDepthWise](#convolutiondepthwise)
- * [ConvolutionDepthWise1D](#convolutiondepthwise1d)
- * [ConvolutionDepthWise3D](#convolutiondepthwise3d)
- * [Crop](#crop)
- * [Deconvolution](#deconvolution)
- * [DeconvolutionDepthWise](#deconvolutiondepthwise)
- * [Dequantize](#dequantize)
- * [Dropout](#dropout)
- * [Eltwise](#eltwise)
- * [ELU](#elu)
- * [Exp](#exp)
- * [Flatten](#flatten)
- * [GELU](#gelu)
- * [Gemm](#gemm)
- * [GroupNorm](#groupnorm)
- * [GRU](#gru)
- * [HardSigmoid](#hardsigmoid)
- * [HardSwish](#hardswish)
- * [InnerProduct](#innerproduct)
- * [Input](#input)
- * [InstanceNorm](#instancenorm)
- * [Interp](#interp)
- * [LayerNorm](#layernorm)
- * [Log](#log)
- * [LRN](#lrn)
- * [LSTM](#lstm)
- * [MemoryData](#memorydata)
- * [Mish](#mish)
- * [MultiHeadAttention](#multiheadattention)
- * [MVN](#mvn)
- * [Noop](#noop)
- * [Normalize](#normalize)
- * [Packing](#packing)
- * [Padding](#padding)
- * [Permute](#permute)
- * [PixelShuffle](#pixelshuffle)
- * [Pooling](#pooling)
- * [Pooling1D](#pooling1d)
- * [Pooling3D](#pooling3d)
- * [Power](#power)
- * [PReLU](#prelu)
- * [Quantize](#quantize)
- * [Reduction](#reduction)
- * [ReLU](#relu)
- * [Reorg](#reorg)
- * [Requantize](#requantize)
- * [Reshape](#reshape)
- * [RNN](#rnn)
- * [Scale](#scale)
- * [SELU](#selu)
- * [ShuffleChannel](#shufflechannel)
- * [Sigmoid](#sigmoid)
- * [Slice](#slice)
- * [Softmax](#softmax)
- * [Softplus](#softplus)
- * [Split](#split)
- * [Swish](#swish)
- * [TanH](#tanh)
- * [Threshold](#threshold)
- * [UnaryOp](#unaryop)
-
- # AbsVal
- ```
- y = abs(x)
- ```
-
- * one_blob_only
- * support_inplace
-
- # ArgMax
- ```
- y = argmax(x, out_max_val, topk)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | out_max_val | int | 0 | |
- | 1 | topk | int | 1 | |
-
- # BatchNorm
- ```
- y = (x - mean) / sqrt(var + eps) * slope + bias
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | channels | int | 0 | |
- | 1 | eps | float | 0.f | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | slope_data | float | [channels] |
- | mean_data | float | [channels] |
- | var_data | float | [channels] |
- | bias_data | float | [channels] |
-
- # Bias
- ```
- y = x + bias
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | bias_data_size| int | 0 | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | bias_data | float | [channels] |
-
- # BinaryOp
- This operation is used for binary computation, and the calculation rule depends on the [broadcasting rule](https://github.com/Tencent/ncnn/wiki/binaryop-broadcasting).
- ```
- C = binaryop(A, B)
- ```
- if with_scalar = 1:
- - one_blob_only
- - support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | op_type | int | 0 | Operation type as follows |
- | 1 | with_scalar | int | 0 | with_scalar=0 B is a matrix, with_scalar=1 B is a scalar |
- | 2 | b | float | 0.f | When B is a scalar, B = b |
-
- Operation type:
- - 0 = ADD
- - 1 = SUB
- - 2 = MUL
- - 3 = DIV
- - 4 = MAX
- - 5 = MIN
- - 6 = POW
- - 7 = RSUB
- - 8 = RDIV
-
- # BNLL
- ```
- y = log(1 + e^(-x)) , x > 0
- y = log(1 + e^x), x < 0
- ```
-
- * one_blob_only
- * support_inplace
-
- # Cast
- ```
- y = cast(x)
- ```
-
- * one_blob_only
- * support_packing
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | type_from | int | 0 | |
- | 1 | type_to | int | 0 | |
-
- Element type:
- - 0 = auto
- - 1 = float32
- - 2 = float16
- - 3 = int8
- - 4 = bfloat16
-
- # Clip
- ```
- y = clamp(x, min, max)
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | min | float | -FLT_MAX | |
- | 1 | max | float | FLT_MAX | |
-
- # Concat
- ```
- y = concat(x0, x1, x2, ...) by axis
- ```
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | axis | int | 0 | |
-
- # Convolution
- ```
- x2 = pad(x, pads, pad_value)
- x3 = conv(x2, weight, kernel, stride, dilation) + bias
- y = activation(x3, act_type, act_params)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_output | int | 0 | |
- | 1 | kernel_w | int | 0 | |
- | 2 | dilation_w | int | 1 | |
- | 3 | stride_w | int | 1 | |
- | 4 | pad_left | int | 0 | |
- | 5 | bias_term | int | 0 | |
- | 6 | weight_data_size| int | 0 | |
- | 8 | int8_scale_term| int | 0 | |
- | 9 | activation_type| int | 0 | |
- | 10 | activation_params| array | [ ] | |
- | 11 | kernel_h | int | kernel_w | |
- | 12 | dilation_h | int | dilation_w | |
- | 13 | stride_h | int | stride_w | |
- | 15 | pad_right | int | pad_left | |
- | 14 | pad_top | int | pad_left | |
- | 16 | pad_bottom | int | pad_top | |
- | 18 | pad_value | float | 0.f | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | weight_data | float/fp16/int8 | [kernel_w, kernel_h, num_input, num_output] |
- | bias_data | float | [num_output] |
- | weight_data_int8_scales| float | [num_output] |
- | bottom_blob_int8_scales| float | [1] |
- | top_blob_int8_scales| float | [1] |
-
- # Convolution1D
- ```
- x2 = pad(x, pads, pad_value)
- x3 = conv1d(x2, weight, kernel, stride, dilation) + bias
- y = activation(x3, act_type, act_params)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_output | int | 0 | |
- | 1 | kernel_w | int | 0 | |
- | 2 | dilation_w | int | 1 | |
- | 3 | stride_w | int | 1 | |
- | 4 | pad_left | int | 0 | |
- | 5 | bias_term | int | 0 | |
- | 6 | weight_data_size| int | 0 | |
- | 9 | activation_type| int | 0 | |
- | 10 | activation_params| array | [ ] | |
- | 15 | pad_right | int | pad_left | |
- | 18 | pad_value | float | 0.f | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | weight_data | float/fp16/int8 | [kernel_w, num_input, num_output] |
- | bias_data | float | [num_output] |
-
- # Convolution3D
- ```
- x2 = pad(x, pads, pad_value)
- x3 = conv3d(x2, weight, kernel, stride, dilation) + bias
- y = activation(x3, act_type, act_params)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_output | int | 0 | |
- | 1 | kernel_w | int | 0 | |
- | 2 | dilation_w | int | 1 | |
- | 3 | stride_w | int | 1 | |
- | 4 | pad_left | int | 0 | |
- | 5 | bias_term | int | 0 | |
- | 6 | weight_data_size| int | 0 | |
- | 9 | activation_type| int | 0 | |
- | 10 | activation_params| array | [ ] | |
- | 11 | kernel_h | int | kernel_w | |
- | 12 | dilation_h | int | dilation_w | |
- | 13 | stride_h | int | stride_w | |
- | 15 | pad_right | int | pad_left | |
- | 14 | pad_top | int | pad_left | |
- | 16 | pad_bottom | int | pad_top | |
- | 17 | pad_behind | int | pad_front | |
- | 18 | pad_value | float | 0.f | |
- | 21 | kernel_d | int | kernel_w | |
- | 22 | dilation_d | int | dilation_w | |
- | 23 | stride_d | int | stride_w | |
- | 24 | pad_front | int | pad_left | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | weight_data | float/fp16/int8 | [kernel_w, kernel_h, kernel_d, num_input, num_output] |
- | bias_data | float | [num_output] |
-
- # ConvolutionDepthWise
- ```
- x2 = pad(x, pads, pad_value)
- x3 = conv(x2, weight, kernel, stride, dilation, group) + bias
- y = activation(x3, act_type, act_params)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_output | int | 0 | |
- | 1 | kernel_w | int | 0 | |
- | 2 | dilation_w | int | 1 | |
- | 3 | stride_w | int | 1 | |
- | 4 | pad_left | int | 0 | |
- | 5 | bias_term | int | 0 | |
- | 6 | weight_data_size| int | 0 | |
- | 7 | group | int | 1 | |
- | 8 | int8_scale_term| int | 0 | |
- | 9 | activation_type| int | 0 | |
- | 10 | activation_params| array | [ ] | |
- | 11 | kernel_h | int | kernel_w | |
- | 12 | dilation_h | int | dilation_w | |
- | 13 | stride_h | int | stride_w | |
- | 15 | pad_right | int | pad_left | |
- | 14 | pad_top | int | pad_left | |
- | 16 | pad_bottom | int | pad_top | |
- | 18 | pad_value | float | 0.f | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | weight_data | float/fp16/int8 | [kernel_w, kernel_h, num_input / group, num_output / group, group] |
- | bias_data | float | [num_output] |
- | weight_data_int8_scales| float | [group] |
- | bottom_blob_int8_scales| float | [1] |
- | top_blob_int8_scales| float | [1] |
-
- # ConvolutionDepthWise1D
- ```
- x2 = pad(x, pads, pad_value)
- x3 = conv1d(x2, weight, kernel, stride, dilation, group) + bias
- y = activation(x3, act_type, act_params)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_output | int | 0 | |
- | 1 | kernel_w | int | 0 | |
- | 2 | dilation_w | int | 1 | |
- | 3 | stride_w | int | 1 | |
- | 4 | pad_left | int | 0 | |
- | 5 | bias_term | int | 0 | |
- | 6 | weight_data_size| int | 0 | |
- | 7 | group | int | 1 | |
- | 9 | activation_type| int | 0 | |
- | 10 | activation_params| array | [ ] | |
- | 15 | pad_right | int | pad_left | |
- | 18 | pad_value | float | 0.f | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | weight_data | float/fp16/int8 | [kernel_w, num_input / group, num_output / group, group] |
- | bias_data | float | [num_output] |
-
- # ConvolutionDepthWise3D
- ```
- x2 = pad(x, pads, pad_value)
- x3 = conv3d(x2, weight, kernel, stride, dilation, group) + bias
- y = activation(x3, act_type, act_params)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_output | int | 0 | |
- | 1 | kernel_w | int | 0 | |
- | 2 | dilation_w | int | 1 | |
- | 3 | stride_w | int | 1 | |
- | 4 | pad_left | int | 0 | |
- | 5 | bias_term | int | 0 | |
- | 6 | weight_data_size| int | 0 | |
- | 7 | group | int | 1 | |
- | 9 | activation_type| int | 0 | |
- | 10 | activation_params| array | [ ] | |
- | 11 | kernel_h | int | kernel_w | |
- | 12 | dilation_h | int | dilation_w | |
- | 13 | stride_h | int | stride_w | |
- | 15 | pad_right | int | pad_left | |
- | 14 | pad_top | int | pad_left | |
- | 16 | pad_bottom | int | pad_top | |
- | 17 | pad_behind | int | pad_front | |
- | 18 | pad_value | float | 0.f | |
- | 21 | kernel_d | int | kernel_w | |
- | 22 | dilation_d | int | dilation_w | |
- | 23 | stride_d | int | stride_w | |
- | 24 | pad_front | int | pad_left | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | weight_data | float/fp16/int8 | [kernel_w, kernel_h, kernel_d, num_input / group, num_output / group, group] |
- | bias_data | float | [num_output] |
-
- # Crop
- ```
- y = crop(x)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | woffset | int | 0 | |
- | 1 | hoffset | int | 0 | |
- | 2 | coffset | int | 1 | |
- | 3 | outw | int | 1 | |
- | 4 | outh | int | 0 | |
- | 5 | outc | int | 0 | |
- | 6 | woffset2 | int | 0 | |
- | 7 | hoffset2 | int | 1 | |
- | 8 | coffset2 | int | 0 | |
- | 9 | starts | array | [ ] | |
- | 10 | ends | array | [ ] | |
- | 11 | axes | array | [ ] | |
-
- # Deconvolution
- ```
- x2 = deconv(x, weight, kernel, stride, dilation) + bias
- x3 = depad(x2, pads, pad_value)
- y = activation(x3, act_type, act_params)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_output | int | 0 | |
- | 1 | kernel_w | int | 0 | |
- | 2 | dilation_w | int | 1 | |
- | 3 | stride_w | int | 1 | |
- | 4 | pad_left | int | 0 | |
- | 5 | bias_term | int | 0 | |
- | 6 | weight_data_size| int | 0 | |
- | 8 | int8_scale_term| int | 0 | |
- | 9 | activation_type| int | 0 | |
- | 10 | activation_params| array | [ ] | |
- | 11 | kernel_h | int | kernel_w | |
- | 12 | dilation_h | int | dilation_w | |
- | 13 | stride_h | int | stride_w | |
- | 15 | pad_right | int | pad_left | |
- | 14 | pad_top | int | pad_left | |
- | 16 | pad_bottom | int | pad_top | |
- | 18 | output_pad_right| int | 0 | |
- | 19 | output_pad_bottom| int | output_pad_right | |
- | 20 | output_w | int | 0 | |
- | 21 | output_h | int | output_w | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | weight_data | float/fp16/int8 | [kernel_w, kernel_h, num_input, num_output] |
- | bias_data | float | [num_output] |
-
- # DeconvolutionDepthWise
- ```
- x2 = deconv(x, weight, kernel, stride, dilation, group) + bias
- x3 = depad(x2, pads, pad_value)
- y = activation(x3, act_type, act_params)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_output | int | 0 | |
- | 1 | kernel_w | int | 0 | |
- | 2 | dilation_w | int | 1 | |
- | 3 | stride_w | int | 1 | |
- | 4 | pad_left | int | 0 | |
- | 5 | bias_term | int | 0 | |
- | 6 | weight_data_size| int | 0 | |
- | 7 | group | int | 1 | |
- | 8 | int8_scale_term| int | 0 | |
- | 9 | activation_type| int | 0 | |
- | 10 | activation_params| array | [ ] | |
- | 11 | kernel_h | int | kernel_w | |
- | 12 | dilation_h | int | dilation_w | |
- | 13 | stride_h | int | stride_w | |
- | 15 | pad_right | int | pad_left | |
- | 14 | pad_top | int | pad_left | |
- | 16 | pad_bottom | int | pad_top | |
- | 18 | output_pad_right| int | 0 | |
- | 19 | output_pad_bottom| int | output_pad_right | |
- | 20 | output_w | int | 0 | |
- | 21 | output_h | int | output_w | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | weight_data | float/fp16/int8 | [kernel_w, kernel_h, num_input / group, num_output / group, group] |
- | bias_data | float | [num_output] |
-
- # Dequantize
- ```
- y = x * scale + bias
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | scale | float | 1.f | |
- | 1 | bias_term | int | 0 | |
- | 2 | bias_data_size| int | 0 | |
-
- # Dropout
- ```
- y = x * scale
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | scale | float | 1.f | |
-
- # Eltwise
- ```
- y = elementwise_op(x0, x1, ...)
- ```
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | op_type | int | 0 | |
- | 1 | coeffs | array | [ ] | |
-
- Operation type:
- - 0 = PROD
- - 1 = SUM
- - 2 = MAX
-
- # ELU
- ```
- if x < 0 y = (exp(x) - 1) * alpha
- else y = x
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | alpha | float | 0.1f | |
-
- # Exp
- ```
- if base == -1 y = exp(shift + x * scale)
- else y = pow(base, (shift + x * scale))
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | base | float | -1.f | |
- | 1 | scale | float | 1.f | |
- | 2 | shift | float | 0.f | |
-
- # Flatten
- Reshape blob to 1 dimension
-
- * one_blob_only
-
- # GELU
- ```
- if fast_gelu == 1 y = 0.5 * x * (1 + tanh(0.79788452 * (x + 0.044715 * x * x * x)));
- else y = 0.5 * x * erfc(-0.70710678 * x)
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | fast_gelu | int | 0 | use approximation |
-
- # Gemm
- ```
- a = transA ? transpose(x0) : x0
- b = transb ? transpose(x1) : x1
- c = x2
- y = gemm(a, b) * alpha + c * beta
- ```
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | alpha | float | 1.f | |
- | 1 | beta | float | 1.f | |
- | 2 | transA | int | 0 | |
- | 3 | transb | int | 0 | |
-
- # GroupNorm
- ```
- split x along channel axis into group x0, x1 ...
- l2 normalize for each group x0, x1 ...
- y = x * gamma + beta
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | group | int | 1 | |
- | 1 | channels | int | 0 | |
- | 2 | eps | float | 0.001f | x = x / sqrt(var + eps) |
- | 3 | affine | int | 1 | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | gamma_data | float | [channels] |
- | beta_data | float | [channels] |
-
- # GRU
- Apply a single-layer GRU to a feature sequence of `T` timesteps. The input blob shape is `[w=input_size, h=T]` and the output blob shape is `[w=num_output, h=T]`.
-
- ```
- y = gru(x)
- y0, hidden y1 = gru(x0, hidden x1)
- ```
-
- * one_blob_only if bidirectional
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_output | int | 0 | hidden size of output |
- | 1 | weight_data_size| int | 0 | total size of weight matrix |
- | 2 | direction | int | 0 | 0=forward, 1=reverse, 2=bidirectional |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | weight_xc_data| float/fp16/int8 | [input_size, num_output * 3, num_directions] |
- | bias_c_data | float/fp16/int8 | [num_output, 4, num_directions] |
- | weight_hc_data| float/fp16/int8 | [num_output, num_output * 3, num_directions] |
-
- Direction flag:
- - 0 = forward only
- - 1 = reverse only
- - 2 = bidirectional
-
- # HardSigmoid
- ```
- y = clamp(x * alpha + beta, 0, 1)
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | alpha | float | 0.2f | |
- | 1 | beta | float | 0.5f | |
-
- # HardSwish
- ```
- y = x * clamp(x * alpha + beta, 0, 1)
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | alpha | float | 0.2f | |
- | 1 | beta | float | 0.5f | |
-
- # InnerProduct
- ```
- x2 = innerproduct(x, weight) + bias
- y = activation(x2, act_type, act_params)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_output | int | 0 | |
- | 1 | bias_term | int | 0 | |
- | 2 | weight_data_size| int | 0 | |
- | 8 | int8_scale_term| int | 0 | |
- | 9 | activation_type| int | 0 | |
- | 10 | activation_params| array | [ ] | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | weight_data | float/fp16/int8 | [num_input, num_output] |
- | bias_data | float | [num_output] |
- | weight_data_int8_scales| float | [num_output] |
- | bottom_blob_int8_scales| float | [1] |
-
- # Input
- ```
- y = input
- ```
-
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | w | int | 0 | |
- | 1 | h | int | 0 | |
- | 2 | c | int | 0 | |
-
- # InstanceNorm
- ```
- split x along channel axis into instance x0, x1 ...
- l2 normalize for each channel instance x0, x1 ...
- y = x * gamma + beta
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | channels | int | 0 | |
- | 1 | eps | float | 0.001f | x = x / sqrt(var + eps) |
- | 2 | affine | int | 1 | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | gamma_data | float | [channels] |
- | beta_data | float | [channels] |
-
- # Interp
- ```
- if dynamic_target_size == 0 y = resize(x) by fixed size or scale
- else y = resize(x0, size(x1))
- ```
-
- * one_blob_only if dynamic_target_size == 0
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | resize_type | int | 0 | |
- | 1 | height_scale | float | 1.f | |
- | 2 | width_scale | float | 1.f | |
- | 3 | output_height | int | 0 | |
- | 4 | output_width | int | 0 | |
- | 5 | dynamic_target_size| int | 0 | |
- | 6 | align_corner | int | 0 | |
-
- Resize type:
- - 1 = Nearest
- - 2 = Bilinear
- - 3 = Bicubic
-
- # LayerNorm
- ```
- split x along outmost axis into part x0, x1 ...
- l2 normalize for each part x0, x1 ...
- y = x * gamma + beta by elementwise
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | affine_size | int | 0 | |
- | 1 | eps | float | 0.001f | x = x / sqrt(var + eps) |
- | 2 | affine | int | 1 | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | gamma_data | float | [affine_size] |
- | beta_data | float | [affine_size] |
-
- # Log
- ```
- if base == -1 y = log(shift + x * scale)
- else y = log(shift + x * scale) / log(base)
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | base | float | -1.f | |
- | 1 | scale | float | 1.f | |
- | 2 | shift | float | 0.f | |
-
- # LRN
- ```
- if region_type == ACROSS_CHANNELS square_sum = sum of channel window of local_size
- if region_type == WITHIN_CHANNEL square_sum = sum of spatial window of local_size
- y = x * pow(bias + alpha * square_sum / (local_size * local_size), -beta)
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | region_type | int | 0 | |
- | 1 | local_size | int | 5 | |
- | 2 | alpha | float | 1.f | |
- | 3 | beta | float | 0.75f | |
- | 4 | bias | float | 1.f | |
-
- Region type:
- - 0 = ACROSS_CHANNELS
- - 1 = WITHIN_CHANNEL
-
- # LSTM
- Apply a single-layer LSTM to a feature sequence of `T` timesteps. The input blob shape is `[w=input_size, h=T]` and the output blob shape is `[w=num_output, h=T]`.
-
- ```
- y = lstm(x)
- y0, hidden y1, cell y2 = lstm(x0, hidden x1, cell x2)
- ```
-
- * one_blob_only if bidirectional
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_output | int | 0 | hidden size of output |
- | 1 | weight_data_size| int | 0 | total size of IFOG weight matrix |
- | 2 | direction | int | 0 | 0=forward, 1=reverse, 2=bidirectional |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | weight_xc_data| float/fp16/int8 | [input_size, num_output * 4, num_directions] |
- | bias_c_data | float/fp16/int8 | [num_output, 4, num_directions] |
- | weight_hc_data| float/fp16/int8 | [num_output, num_output * 4, num_directions] |
-
- Direction flag:
- - 0 = forward only
- - 1 = reverse only
- - 2 = bidirectional
-
- # MemoryData
- ```
- y = data
- ```
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | w | int | 0 | |
- | 1 | h | int | 0 | |
- | 2 | c | int | 0 | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | data | float | [w, h, c] |
-
- # Mish
- ```
- y = x * tanh(log(exp(x) + 1))
- ```
-
- * one_blob_only
- * support_inplace
-
- # MultiHeadAttention
- ```
- split q k v into num_head part q0, k0, v0, q1, k1, v1 ...
- for each num_head part
- xq = affine(q) / (embed_dim / num_head)
- xk = affine(k)
- xv = affine(v)
- xqk = xq * xk
- softmax_inplace(xqk)
- xqkv = xqk * xv
- merge xqkv to out
- y = affine(out)
- ```
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | embed_dim | int | 0 | |
- | 1 | num_head | int | 1 | |
- | 2 | weight_data_size| int | 0 | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | q_weight_data | float/fp16/int8 | [weight_data_size] |
- | q_bias_data | float | [embed_dim] |
- | k_weight_data | float/fp16/int8 | [weight_data_size] |
- | k_bias_data | float | [embed_dim] |
- | v_weight_data | float/fp16/int8 | [weight_data_size] |
- | v_bias_data | float | [embed_dim] |
- | out_weight_data| float/fp16/int8 | [weight_data_size] |
- | out_bias_data | float | [embed_dim] |
-
- # MVN
- ```
- if normalize_variance == 1 && across_channels == 1 y = (x - mean) / (sqrt(var) + eps) of whole blob
- if normalize_variance == 1 && across_channels == 0 y = (x - mean) / (sqrt(var) + eps) of each channel
- if normalize_variance == 0 && across_channels == 1 y = x - mean of whole blob
- if normalize_variance == 0 && across_channels == 0 y = x - mean of each channel
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | normalize_variance| int | 0 | |
- | 1 | across_channels| int | 0 | |
- | 2 | eps | float | 0.0001f | x = x / (sqrt(var) + eps) |
-
- # Noop
- ```
- y = x
- ```
-
- # Normalize
- ```
- if across_spatial == 1 && across_channel == 1 x2 = normalize(x) of whole blob
- if across_spatial == 1 && across_channel == 0 x2 = normalize(x) of each channel
- if across_spatial == 0 && across_channel == 1 x2 = normalize(x) of each position
- y = x2 * scale
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | across_spatial| int | 0 | |
- | 1 | channel_shared| int | 0 | |
- | 2 | eps | float | 0.0001f | see eps mode |
- | 3 | scale_data_size| int | 0 | |
- | 4 | across_channel| int | 0 | |
- | 9 | eps_mode | int | 0 | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | scale_data | float | [scale_data_size] |
-
- Eps Mode:
- - 0 = caffe/mxnet x = x / sqrt(var + eps)
- - 1 = pytorch x = x / max(sqrt(var), eps)
- - 2 = tensorflow x = x / sqrt(max(var, eps))
-
- # Packing
- ```
- y = wrap_packing(x)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | out_elempack | int | 1 | |
- | 1 | use_padding | int | 0 | |
- | 2 | cast_type_from| int | 0 | |
- | 3 | cast_type_to | int | 0 | |
- | 4 | storage_type_from| int | 0 | |
- | 5 | storage_type_to| int | 0 | |
-
- # Padding
- ```
- y = pad(x, pads)
- ```
-
- | param id | name | type | default | description |
- | --------- | ------------- | ---- | --------- | ----------------- |
- | 0 | top | int | 0 | |
- | 1 | bottom | int | 0 | |
- | 2 | left | int | 0 | |
- | 3 | right | int | 0 | |
- | 4 | type | int | 0 | |
- | 5 | value | float | 0 | |
- | 6 | per_channel_pad_data_size| int | 0 | |
- | 7 | front | int | stride_w | |
- | 8 | behind | int | pad_left | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | per_channel_pad_data| float | [per_channel_pad_data_size] |
-
- Padding type:
- - 0 = CONSTANT
- - 1 = REPLICATE
- - 2 = REFLECT
-
- # Permute
- ```
- y = reorder(x)
- ```
-
- | param id | name | type | default | description |
- | --------- | ------------- | ---- | --------- | ----------------- |
- | 0 | order_type | int | 0 | |
-
- Order Type:
- - 0 = WH WHC
- - 1 = HW HWC
- - 2 = WCH
- - 3 = CWH
- - 4 = HCW
- - 5 = CHW
-
- # PixelShuffle
- ```
- if mode == 0 y = depth_to_space(x) where x channel order is sw-sh-outc
- if mode == 1 y = depth_to_space(x) where x channel order is outc-sw-sh
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ---- | --------- | ----------------- |
- | 0 | upscale_factor| int | 1 | |
- | 1 | mode | int | 0 | |
-
- # Pooling
- ```
- x2 = pad(x, pads)
- x3 = pooling(x2, kernel, stride)
- ```
-
- | param id | name | type | default | description |
- | --------- | --------------| ---- | --------- | ----------------- |
- | 0 | pooling_type | int | 0 | |
- | 1 | kernel_w | int | 0 | |
- | 2 | stride_w | int | 1 | |
- | 3 | pad_left | int | 0 | |
- | 4 | global_pooling| int | 0 | |
- | 5 | pad_mode | int | 0 | |
- | 6 | avgpool_count_include_pad| int | 0 | |
- | 7 | adaptive_pooling| int | 0 | |
- | 8 | out_w | int | 0 | |
- | 11 | kernel_h | int | kernel_w | |
- | 12 | stride_h | int | stride_w | |
- | 13 | pad_top | int | pad_left | |
- | 14 | pad_right | int | pad_left | |
- | 15 | pad_bottom | int | pad_top | |
- | 18 | out_h | int | out_w | |
-
- Pooling type:
- - 0 = MAX
- - 1 = AVG
-
- Pad mode:
- - 0 = full padding
- - 1 = valid padding
- - 2 = tensorflow padding=SAME or onnx padding=SAME_UPPER
- - 3 = onnx padding=SAME_LOWER
-
- # Pooling1D
- ```
- x2 = pad(x, pads)
- x3 = pooling1d(x2, kernel, stride)
- ```
-
- | param id | name | type | default | description |
- | --------- | --------------| ---- | --------- | ----------------- |
- | 0 | pooling_type | int | 0 | |
- | 1 | kernel_w | int | 0 | |
- | 2 | stride_w | int | 1 | |
- | 3 | pad_left | int | 0 | |
- | 4 | global_pooling| int | 0 | |
- | 5 | pad_mode | int | 0 | |
- | 6 | avgpool_count_include_pad| int | 0 | |
- | 7 | adaptive_pooling| int | 0 | |
- | 8 | out_w | int | 0 | |
- | 14 | pad_right | int | pad_left | |
-
- Pooling type:
- - 0 = MAX
- - 1 = AVG
-
- Pad mode:
- - 0 = full padding
- - 1 = valid padding
- - 2 = tensorflow padding=SAME or onnx padding=SAME_UPPER
- - 3 = onnx padding=SAME_LOWER
-
- # Pooling3D
- ```
- x2 = pad(x, pads)
- x3 = pooling3d(x2, kernel, stride)
- ```
-
- | param id | name | type | default | description |
- | --------- | --------------| ---- | --------- | ----------------- |
- | 0 | pooling_type | int | 0 | |
- | 1 | kernel_w | int | 0 | |
- | 2 | stride_w | int | 1 | |
- | 3 | pad_left | int | 0 | |
- | 4 | global_pooling| int | 0 | |
- | 5 | pad_mode | int | 0 | |
- | 6 | avgpool_count_include_pad| int | 0 | |
- | 7 | adaptive_pooling| int | 0 | |
- | 8 | out_w | int | 0 | |
- | 11 | kernel_h | int | kernel_w | |
- | 12 | stride_h | int | stride_w | |
- | 13 | pad_top | int | pad_left | |
- | 14 | pad_right | int | pad_left | |
- | 15 | pad_bottom | int | pad_top | |
- | 16 | pad_behind | int | pad_front | |
- | 18 | out_h | int | out_w | |
- | 21 | kernel_d | int | kernel_w | |
- | 22 | stride_d | int | stride_w | |
- | 23 | pad_front | int | pad_top | |
- | 28 | out_d | int | out_w | |
-
- Pooling type:
- - 0 = MAX
- - 1 = AVG
-
- Pad mode:
- - 0 = full padding
- - 1 = valid padding
- - 2 = tensorflow padding=SAME or onnx padding=SAME_UPPER
- - 3 = onnx padding=SAME_LOWER
-
- # Power
- ```
- y = pow((shift + x * scale), power)
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | power | float | 1.f | |
- | 1 | scale | float | 1.f | |
- | 2 | shift | float | 0.f | |
-
- # PReLU
- ```
- if x < 0 y = x * slope
- else y = x
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_slope | int | 0 | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | slope_data | float | [num_slope] |
-
- # Quantize
- ```
- y = float2int8(x * scale)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | scale_data_size| int | 0 | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | scale_data | float | [scale_data_size] |
-
- # Reduction
- ```
- y = reduce_op(x * coeff)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | operation | int | 0 | |
- | 1 | reduce_all | int | 1 | |
- | 2 | coeff | float | 1.f | |
- | 3 | axes | array | [ ] | |
- | 4 | keepdims | int | 0 | |
-
- Operation type:
- - 0 = SUM
- - 1 = ASUM
- - 2 = SUMSQ
- - 3 = MEAN
- - 4 = MAX
- - 5 = MIN
- - 6 = PROD
- - 7 = L1
- - 8 = L2
- - 9 = LogSum
- - 10 = LogSumExp
-
- # ReLU
- ```
- if x < 0 y = x * slope
- else y = x
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | slope | float | 0.f | |
-
- # Reorg
- ```
- if mode == 0 y = space_to_depth(x) where x channel order is sw-sh-outc
- if mode == 1 y = space_to_depth(x) where x channel order is outc-sw-sh
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ---- | --------- | ----------------- |
- | 0 | stride | int | 1 | |
- | 1 | mode | int | 0 | |
-
- # Requantize
- ```
- x2 = x * scale_in + bias
- x3 = activation(x2)
- y = float2int8(x3 * scale_out)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | scale_in_data_size| int | 1 | |
- | 1 | scale_out_data_size| int | 1 | |
- | 2 | bias_data_size| int | 0 | |
- | 3 | activation_type| int | 0 | |
- | 4 | activation_params| int | [ ] | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | scale_in_data | float | [scale_in_data_size] |
- | scale_out_data| float | [scale_out_data_size] |
- | bias_data | float | [bias_data_size] |
-
- # Reshape
- ```
- if permute == 1 y = hwc2chw(reshape(chw2hwc(x)))
- else y = reshape(x)
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | w | int | -233 | |
- | 1 | h | int | -233 | |
- | 2 | c | int | -233 | |
- | 3 | permute | int | 0 | |
-
- Reshape flag:
- - 0 = copy from bottom
- - -1 = remaining
- - -233 = drop this dim(default)
-
- # RNN
- Apply a single-layer RNN to a feature sequence of `T` timesteps. The input blob shape is `[w=input_size, h=T]` and the output blob shape is `[w=num_output, h=T]`.
-
- ```
- y = rnn(x)
- y0, hidden y1 = rnn(x0, hidden x1)
- ```
-
- * one_blob_only if bidirectional
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | num_output | int | 0 | hidden size of output |
- | 1 | weight_data_size| int | 0 | total size of weight matrix |
- | 2 | direction | int | 0 | 0=forward, 1=reverse, 2=bidirectional |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | weight_xc_data| float/fp16/int8 | [input_size, num_output, num_directions] |
- | bias_c_data | float/fp16/int8 | [num_output, 1, num_directions] |
- | weight_hc_data| float/fp16/int8 | [num_output, num_output, num_directions] |
-
- Direction flag:
- - 0 = forward only
- - 1 = reverse only
- - 2 = bidirectional
-
- # Scale
- ```
- if scale_data_size == -233 y = x0 * x1
- else y = x * scale + bias
- ```
-
- * one_blob_only if scale_data_size != -233
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | scale_data_size| int | 0 | |
- | 1 | bias_term | int | 0 | |
-
- | weight | type | shape |
- | ------------- | ----- | --------------------- |
- | scale_data | float | [scale_data_size] |
- | bias_data | float | [scale_data_size] |
-
- # SELU
- ```
- if x < 0 y = (exp(x) - 1.f) * alpha * lambda
- else y = x * lambda
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | alpha | float | 1.67326324f| |
- | 1 | lambda | float | 1.050700987f| |
-
- # ShuffleChannel
- ```
- if reverse == 0 y = shufflechannel(x) by group
- if reverse == 1 y = shufflechannel(x) by channel / group
- ```
-
- * one_blob_only
-
- | param id | name | type | default | description |
- | --------- | ------------- | ---- | --------- | ----------------- |
- | 0 | group | int | 1 | |
- | 1 | reverse | int | 0 | |
-
- # Sigmoid
- ```
- y = 1 / (1 + exp(-x))
- ```
-
- * one_blob_only
- * support_inplace
-
- # Slice
- ```
- split x along axis into slices, each part slice size is based on slices array
- ```
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | slices | array | [ ] | |
- | 1 | axis | int | 0 | |
-
- # Softmax
- ```
- softmax(x, axis)
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | axis | int | 0 | |
- | 1 | fixbug0 | int | 0 | hack for bug fix, should be 1 |
-
- # Softplus
- ```
- y = log(exp(x) + 1)
- ```
-
- * one_blob_only
- * support_inplace
-
- # Split
- ```
- y0, y1 ... = x
- ```
-
- # Swish
- ```
- y = x / (1 + exp(-x))
- ```
-
- * one_blob_only
- * support_inplace
-
- # TanH
- ```
- y = tanh(x)
- ```
-
- * one_blob_only
- * support_inplace
-
- # Threshold
- ```
- if x > threshold y = 1
- else y = 0
- ```
-
- * one_blob_only
- * support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | threshold | float | 0.f | |
-
- # UnaryOp
- ```
- y = unaryop(x)
- ```
-
- - one_blob_only
- - support_inplace
-
- | param id | name | type | default | description |
- | --------- | ------------- | ----- | --------- | ----------------- |
- | 0 | op_type | int | 0 | Operation type as follows |
-
- Operation type:
- - 0 = ABS
- - 1 = NEG
- - 2 = FLOOR
- - 3 = CEIL
- - 4 = SQUARE
- - 5 = SQRT
- - 6 = RSQ
- - 7 = EXP
- - 8 = LOG
- - 9 = SIN
- - 10 = COS
- - 11 = TAN
- - 12 = ASIN
- - 13 = ACOS
- - 14 = ATAN
- - 15 = RECIPROCAL
- - 16 = TANH
|