|
- /**
- * 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;
- }
|