|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104 |
- /**
- * Copyright 2019 Huawei Technologies Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
- namespace mindspore.schema;
-
- enum ResizeMethod: byte {
- UNKNOW = -1,
- LINEAR = 0,
- NEAREST = 1,
- CUBIC = 2
- }
-
- enum CoordinateTransformMode: byte {
- COMMON = 0,
- HALF_PIXEL = 1,
- PYTORCH_HALF_PIXEL = 2,
- TF_HALF_PIXEL = 3,
- TF_CROP_AND_RESIZE = 4,
- ALIGN_CORNERS = 5,
- ASYMMETRIC = 6,
- ALIGN_CORNERS_WITH_HALF_PIEXL = 7
- }
-
- enum NearestMode : byte {
- NORMAL = 0,
- ROUND_HALF_DOWN = 1,
- ROUND_HALF_UP = 2,
- FLOOR = 3,
- CEIL = 4
- }
-
- enum Format : int {
- NCHW = 0,
- NHWC,
- NHWC4,
- HWKC,
- HWCK,
- KCHW,
- CKHW,
- KHWC,
- CHWK,
- HW,
- HW4,
- NC,
- NC4,
- NC4HW4 = 100,
- NUM_OF_FORMAT
- }
-
- enum ActivationType : byte {
- NO_ACTIVATION = 0,
- RELU = 1,
- SIGMOID = 2,
- RELU6 = 3,
- ELU = 4,
- LEAKY_RELU = 5,
- ABS = 6,
- RELU1 = 7,
- SOFTSIGN = 8,
- SOFTPLUS = 9,
- TANH = 10,
- SELU = 11,
- HSWISH = 12,
- HSIGMOID = 13,
- THRESHOLDRELU = 14,
- LINEAR = 15,
- HARD_TANH = 16,
- SIGN = 17,
- UNKNOW = 18
- }
- enum ActivationGradType : byte {
- NO_ACTIVATION = 0,
- RELU = 1,
- SIGMOID = 2,
- RELU6 = 3,
- ELU = 4,
- LEAKY_RELU = 5,
- ABS = 6,
- RELU1 = 7,
- SOFTSIGN = 8,
- SOFTPLUS = 9,
- TANH = 10,
- SELU = 11,
- HSWISH = 12,
- HSIGMOID = 13,
- THRESHOLDRELU = 14,
- LINEAR = 15,
- UNKNOW = 16
- }
- enum ReduceType : byte {
- REDUCE_MAX = 0,
- REDUCE_MEAN = 1,
- REDUCE_ALL = 2,
- REDUCE_ANY = 3,
- REDUCE_LOG_SUM_EXP = 4,
- REDUCE_PROD = 5,
- REDUCE_SUM = 6,
- UNKNOW = 7
- }
-
- enum PoolMode : byte {
- MAX_POOLING = 0,
- MEAN_POOLING = 1,
- }
-
- enum EltwiseMode : byte {
- PROD = 0,
- SUM = 1,
- MAXIMUM = 2,
- UNKNOW = 3
- }
-
- enum PadMode : byte {
- NOTSET = 0,
- SAME_UPPER = 1,
- VALID = 2,
- CAFFE = 4,
- SAME_LOWER = 5
- }
-
- enum RoundMode : byte {
- FLOOR = 0,
- CEIL = 1
- }
-
- enum PaddingMode : byte {
- CONSTANT = 0,
- REFLECT = 1,
- SYMMETRIC = 2,
- MODE_RESERVED = 3
- }
-
- enum LshProjectionType : byte {
- UNKNOWN = 0,
- SPARSE = 1,
- DENSE = 2
- }
-
- table Pad {
- paddings: [int];
- paddingMode: PaddingMode;
- constantValue: float;
- }
-
- table Maximum {
- }
-
- table Minimum {
- }
-
- table Flatten {
- }
- table FlattenGrad {
- }
- table Concat {
- axis: int;
- n: int;
- }
-
- table SoftMax {
- axis: int;
- }
-
- table Activation {
- type: ActivationType = 0;
- alpha: float = 0.2;
- min_val: float = -1.0;
- max_val: float = 1.0;
- }
- table ActivationGrad {
- type: ActivationType = 0;
- alpha: float = 0.2;
- }
-
-
- table Conv2D {
- format: Format = 0;
- group: int;
- channelIn: int;
- channelOut: int;
- kernelW: int;
- kernelH: int;
- strideW: int;
- strideH: int;
- padMode: PadMode;
- padUp: int;
- padDown: int;
- padLeft: int;
- padRight: int;
- dilateW: int;
- dilateH: int;
- hasBias: bool = false;
- activationType: ActivationType = 0;
- }
-
- table Conv2DGradFilter {
- format: Format = 0;
- group: int;
- channelIn: int;
- channelOut: int;
- kernelW: int;
- kernelH: int;
- strideW: int;
- strideH: int;
- padMode: PadMode;
- padUp: int;
- padDown: int;
- padLeft: int;
- padRight: int;
- dilateW: int;
- dilateH: int;
- hasBias: bool = false;
- activationType: ActivationType = 0;
- }
-
- table Conv2DGradInput {
- format: Format = 0;
- group: int;
- channelIn: int;
- channelOut: int;
- kernelW: int;
- kernelH: int;
- strideW: int;
- strideH: int;
- padMode: PadMode;
- padUp: int;
- padDown: int;
- padLeft: int;
- padRight: int;
- dilateW: int;
- dilateH: int;
- hasBias: bool = false;
- activationType: ActivationType = 0;
- }
-
- table GroupConv2DGradInput {
- format: Format = 0;
- group: int;
- channelIn: int;
- channelOut: int;
- kernelW: int;
- kernelH: int;
- strideW: int;
- strideH: int;
- padMode: PadMode;
- padUp: int;
- padDown: int;
- padLeft: int;
- padRight: int;
- dilateW: int;
- dilateH: int;
- hasBias: bool = false;
- activationType: ActivationType = 0;
- }
-
- table FusedBatchNorm {
- epsilon: float = 0.00001; // eg. epsilon=0.001
- momentum: float = 0.9;
- spatial: int = 1;
- }
-
- table BatchNorm {
- epsilon: float = 0.00001; // eg. epsilon=0.001
- }
-
- table BiasGrad {
- axis: [int];
- }
-
-
- table SoftmaxCrossEntropy {
- axis: [int];
- }
-
- table make_tuple {
- }
-
-
- table PoolingGrad {
- format: Format = 0;
- poolingMode: PoolMode;
- global: bool = false;
- windowW: int;
- windowH: int;
- strideW: int;
- strideH: int;
- padMode: PadMode;
- padUp: int;
- padDown: int;
- padLeft: int;
- padRight: int;
- roundMode: RoundMode;
- }
- table Shape {
- }
-
- table ConstantOfShape{
- dataType: int;
- value: [float];
- }
-
- table Nchw2Nhwc {
-
- }
-
- table Nhwc2Nchw {
-
- }
-
- table FakeQuantWithMinMaxVars {
- narrowRange: bool;
- numBits: int;
- }
-
- table BiasAdd {
- axis: [int];
- }
-
- table ROIPooling {
- pooledH: int;
- pooledW: int;
- scale: float;
- }
-
- table Pooling {
- format: Format = 0;
- poolingMode: PoolMode;
- global: bool = false;
- windowW: int;
- windowH: int;
- strideW: int;
- strideH: int;
- padMode: PadMode;
- padUp: int;
- padDown: int;
- padLeft: int;
- padRight: int;
- roundMode: RoundMode;
- activationType: ActivationType = 0;
- avgMode: int = 0;
- }
-
- table DepthwiseConv2D {
- format: Format = 0;
- channelIn: int;
- channelMultiplier: int;
- kernelW: int;
- kernelH: int;
- strideW: int;
- strideH: int;
- padMode: PadMode;
- padUp: int;
- padDown: int;
- padLeft: int;
- padRight: int;
- dilateW: int;
- dilateH: int;
- hasBias: bool = false;
- activationType: ActivationType = 0;
- }
-
- table DeDepthwiseConv2D {
- format: Format = 0;
- channelIn: int;
- channelMultiplier: int;
- kernelW: int;
- kernelH: int;
- strideW: int;
- strideH: int;
- padMode: PadMode;
- padUp: int;
- padDown: int;
- padLeft: int;
- padRight: int;
- dilateW: int;
- dilateH: int;
- hasBias: bool = false;
- activationType: ActivationType = 0;
- }
-
-
- table Resize {
- format: Format = 0;
- method: ResizeMethod;
- newHeight: long;
- newWidth: long;
- alignCorners: bool = false; // DEPRECATED IN FUTURE: use 'coordinateTransformMode' instead.
- preserveAspectRatio: bool = false;
- coordinateTransformMode : CoordinateTransformMode;
- cubicCoeff : float;
- excludeOutside : int;
- extrapolationValue : float = 0;
- nearestMode : NearestMode;
- }
-
- table DetectionPostProcess {
- format: Format = 0;
- inputSize: int;
- hScale: float;
- wScale: float;
- xScale: float;
- yScale: float;
- NmsIouThreshold: float;
- NmsScoreThreshold: float;
- MaxDetections: long;
- DetectionsPerClass: long;
- MaxClassesPerDetection: long;
- NumClasses: long;
- UseRegularNms: bool;
- OutQuantized: bool;
- }
-
- table FullConnection {
- hasBias: bool;
- axis: int;
- useAxis: bool;
- activationType: ActivationType = 0;
- }
-
- // Mean(input_tensor, axis, keep_dims)
- table Mean {
- axis: [int];
- keepDims: bool = false;
- }
-
- table DeConv2D {
- format: Format = 0;
- group: int;
- channelIn: int;
- channelOut: int;
- kernelW: int;
- kernelH: int;
- strideW: int;
- strideH: int;
- padMode: PadMode;
- padUp: int;
- padDown: int;
- padLeft: int;
- padRight: int;
- dilateW: int;
- dilateH: int;
- hasBias: bool = false;
- activationType: ActivationType = 0;
- }
-
- table DeConv2DGradFilter {
- format: Format = 0;
- group: int;
- channelIn: int;
- channelOut: int;
- kernelW: int;
- kernelH: int;
- strideW: int;
- strideH: int;
- padMode: PadMode;
- padUp: int;
- padDown: int;
- padLeft: int;
- padRight: int;
- dilateW: int;
- dilateH: int;
- hasBias: bool = false;
- activationType: ActivationType = 0;
- }
-
- table BNGrad {
- eps : float;
- momentum: float;
- }
- table BNGradInput {
- eps : float;
- momentum: float;
- }
- table Scale {
- axis: int;
- activationType: ActivationType = 0;
- }
-
- table Eltwise {
- mode: EltwiseMode;
- }
-
- table Add {
- activationType: ActivationType = 0;
- }
-
- table Sub {
- activationType: ActivationType = 0;
- }
-
- table Mul {
- activationType: ActivationType = 0;
- }
-
- table Div {
- activationType: ActivationType = 0;
- }
-
- table AddGrad {
- }
-
- table SubGrad {
- }
-
- table MulGrad {
- }
-
- table DivGrad {
- }
- table RealDiv {
- }
-
- table Rsqrt {
- }
-
- table Equal {
- }
-
- table Less {
- }
-
- table Greater {
- }
-
- table NotEqual {
- }
-
- table LessEqual {
- }
-
- table GreaterEqual {
- }
-
- table Min {
- }
-
- table Slice {
- format: Format = 0;
- axes: [int];
- begin: [int];
- size: [int];
- }
-
- table Floor {
- }
-
- table Abs {
- }
-
- table Neg {
- }
-
- table NegGrad {
- }
-
- table Exp {
- base : float = -1.0;
- scale : float = 1.0;
- shift : float = 0.0;
- }
-
- table Cos {
- }
-
- table Sin {
- }
-
- table Sqrt {
- }
-
- table Square {
- }
-
- table Ceil {
- }
-
- table Log {
- }
-
- table LogGrad {
- }
-
- table Tan {
- }
-
- table Atan {
- }
-
- table Asin {
- }
-
- table Reshape {
- format: Format = 0;
- shape: [long];
- }
-
- table Power {
- power: float;
- scale: float;
- shift: float;
- }
- table PowerGrad {
- power: float;
- scale: float;
- shift: float;
- }
- table ArgMax {
- axis: int;
- outMaxValue: bool;
- topK: int = 1;
- keepDims: bool;
- axisType: int;
- }
-
- table ArgMin {
- axis: int;
- outMaxValue: bool;
- topK: int = 1;
- keepDims: bool;
- axisType: int;
- }
-
- table NetOutput {
- }
-
- table MatMul {
- broadcast : bool = false;
- transposeA : bool = false;
- transposeB : bool = false;
- }
-
- table PReLU {
- channelShared : bool = false;
- slope: [float];
- }
-
- table LeakyReLU {
- negativeSlope: float;
- }
-
- table StridedSlice {
- beginMask: int;
- endMask: int;
- ellipsisMask: int;
- newAxisMask: int;
- shrinkAxisMask: int;
- begin: [int];
- end: [int];
- stride: [int];
- isScale: [int];
- }
-
- table Stack {
- axis: int;
- n: int;
- isScale: [int];
- }
-
- table Range {
- dType: int;
- start: int;
- limit: int;
- delta: int;
- }
-
- table ExpandDims {
- dim: int;
- }
-
- table Tile {
- multiples: [int];
- dims: [int];
- }
-
- table Cast {
- srcT: int;
- dstT: int;
- }
-
- table QuantDTypeCast {
- srcT: int;
- dstT: int;
- }
-
- table Split {
- numberSplit: int;
- sizeSplits: [int];
- splitDim: int;
- }
-
- table Crop {
- axis : long;
- offsets : [long];
- }
-
- table Permute {
- order: [long];
- }
-
- table Clip {
- max: float;
- min: float;
- }
-
- table Constant {
- }
-
-
- table Elu {
- alpha: float = 1.0;
- }
-
- table Broadcast {
- }
-
- table BroadcastTo {
- dst_shape: [int];
- }
-
- table Lrn {
- alpha: float = 0.0001;
- beta: float = 0.75;
- bias: float = 1.0;
- size: int;
- }
-
- enum ReduceMode : byte {
- ReduceMean = 0,
- ReduceMax = 1,
- ReduceMin = 2,
- ReduceProd = 3,
- ReduceSum = 4,
- ReduceSumSquare = 5,
- ReduceASum = 6
- }
-
- table Reduce {
- axes: [int];
- keepDims: int;
- mode: ReduceMode;
- reduceToEnd: bool = false;
- coeff: float = 1.0;
- }
-
- table Transpose {
- perm: [int];
- conjugate: bool = false;
- }
-
- table Squeeze {
- axis: [int];
- }
-
- table Unsqueeze {
- axis: [int];
- }
-
- table Upsample {
- mode: string;
- scales: [float];
- }
-
- table Dropout {
- ratio : float = 0.5;
- }
-
- table LocalResponseNormalization {
- depth_radius: int;
- bias: float;
- alpha: float;
- beta: float;
- }
-
- table ZerosLike {
- }
-
- table TopK {
- k : int;
- sorted : bool = true;
- }
-
- table SpaceToDepth {
- blockSize : int;
- format: Format = 0;
- }
-
- table SpaceToBatch {
- blockShape : [int];
- paddings : [int];
- }
-
- table SparseToDense {
- validateIndices: bool;
- }
-
- table ReverseSequence {
- seqAxis: int;
- batchAxis: int;
- }
-
- table Rank {
- }
-
-
- table Gather {
- axis: int;
- batchDims: int;
- }
-
- table GatherNd {
- batchDims: int;
- }
-
- table Fill {
- dims: [int];
- }
-
- table DepthToSpace {
- blockSize: int;
- format: Format = 0;
- }
-
-
- table BatchToSpace {
- blockShape: [int];
- crops: [int];
- }
-
- table BatchToSpaceND {
- blockShape: [int];
- crops: [int];
- }
-
- table AddN {
- N: int;
- }
-
-
- table EmbeddingLookup {
- maxNorm: float = 0.0;
- }
-
- table EmbeddingLookupSparse {
- spIds: [int];
- spWeights: [float];
- //combiner: Combiner=0;
- maxNortm: float;
- }
-
- table FloorDiv {
- }
-
- table FloorMod {
- }
-
- table L2Norm {
- axis: [int];
- epsilon: float;
- activationType: ActivationType = 0;
- }
-
- table LogicalAnd {
- }
-
- table LogicalOr {
- }
-
- table LogicalXor {
- }
-
- table LogicalNot {
- }
-
- table MatrixDiag {
- k: int;
- numRows: int;
- numCols: int;
- paddingValue: float;
- }
-
- table Select {
- }
-
- table TfReduce {
- type: ReduceType = 7;
- }
-
- table Reverse {
- axis: [int];
- }
-
- table Round {
- }
-
- table Scatter {
- }
-
- table ScatterND {
- }
-
- table Unique {
- outType: int;
- }
-
- table Unstack {
- num: int;
- axis: int;
- }
-
- table OnnxInt8Quantize {
- }
-
- table OnnxInt8Dequantize {
- }
-
- table FakeQuantWithMinMax {
- }
-
- table FakeQuantWithMinMaxPerChannel {
- }
-
- table BatchNormFold {
- }
-
- table MulFold {
- }
-
- table AddFold {
- }
-
- table SquaredDifference {
- }
-
- table TupleGetItem {
- }
-
- table ApplyMomentum {
- gradientScale: float;
- useNesterov: bool;
- }
-
- table Sgd {
- weightDecay: float;
- dampening: float;
- useNesterov: bool;
- }
-
- table Adam {
- useNesterov: bool;
- }
-
- table Assign {
- }
-
-
- table Where{
- condition: [bool];
- }
-
- table OneHot {
- axis: int;
- }
-
- table Lstm{
- bidirection: bool = false;
- }
-
- table PriorBox {
- min_sizes: [int];
- max_sizes: [int];
- aspect_ratios: [float];
- variances: [float];
- image_size_w: int;
- image_size_h: int;
- step_w: float;
- step_h: float;
- clip: bool = true;
- flip: bool = true;
- offset: float;
- }
-
- table SpaceToBatchND {
- blockShape : [int];
- paddings : [int];
- }
-
- table MakeTuple {
- }
-
- table ToFormat {
- srcT: int;
- dstT: int;
- }
-
-
- table Depend {
- }
-
- table Return {
- }
-
- table Proposal {
- feat_stride : float;
- base_size : float;
- min_size : float;
- ratio : [float];
- scale : [float];
- pre_nms_topn : int;
- post_nms_topn : int;
- nms_thresh : float;
- }
-
- table Custom {
- custom : [ubyte];
- }
-
-
- table BlackBox {
- id : string;
- size : int;
- address : [ubyte];
- }
-
- table LshProjection {
- type : LshProjectionType;
- }
-
- table HashtableLookup {
- }
-
- table SkipGram {
- includeAllGrams : bool;
- maxSkipSize : int;
- ngramSize : int;
- }
-
- table CustomPredict {
- outputNum : int;
- weightThreshold : float;
- }
-
- table CustomNormalize {
- }
-
- table CustomExtractFeatures {
- }
-
- table AudioSpectrogram {
- windowSize : int;
- stride : int;
- magSquare : bool;
- }
-
- table Mfcc {
- freqUpperLimit : float;
- freqLowerLimit : float;
- filterBankChannelNum : int;
- dctCoeffNum : int;
- }
-
- table Rfft {
- fftLength : int;
- }
-
- table FftReal {
- }
-
- table FftImag {
- }
-
- table NonMaxSuppression {
- centerPointBox : int = 0;
- }
-
- table InstanceNorm {
- epsilon : float = 0.00001;
- }
-
- table Loop {
- subGraphIndex : int;
- }
-
- table Identity {
- }
-
- table LayerNorm {
- normalizedShape : [int];
- epsilon : float = 0.00001;
- elementwiseAffine : bool;
- }
-
|