ONNX Operators#

Lists out all the ONNX operators. For each operator, lists out the usage guide, parameters, examples, and line-by-line version history. This section also includes tables detailing each operator with its versions, as done in Operators.md.

All examples end by calling function expect. which checks a runtime produces the expected output for this example. One implementation based on onnxruntime can be found at Sample operator test code.

operator

versions

differences

Abs

13, 6, 1

13/6, 13/1, 6/1

Acos

7

Acosh

9

Add

14, 13, 7, 6, 1

14/13, 14/7, 13/7, 14/6, 13/6, 7/6, 14/1, 13/1, 7/1, 6/1

And

7, 1

7/1

ArgMax

13, 12, 11, 1

13/12, 13/11, 12/11, 13/1, 12/1, 11/1

ArgMin

13, 12, 11, 1

13/12, 13/11, 12/11, 13/1, 12/1, 11/1

Asin

7

Asinh

9

Atan

7

Atanh

9

AttributeHasValue

18

AveragePool

11, 10, 7, 1

11/10, 11/7, 10/7, 11/1, 10/1, 7/1

BatchNormalization

15, 14, 9, 7, 6, 1

15/14, 15/9, 14/9, 15/7, 14/7, 9/7, 15/6, 14/6, 9/6, 7/6, 15/1, 14/1, 9/1, 7/1, 6/1

Bernoulli

15

BitShift

11

BlackmanWindow

17

Cast

13, 9, 6, 1

13/9, 13/6, 9/6, 13/1, 9/1, 6/1

CastLike

15

Ceil

13, 6, 1

13/6, 13/1, 6/1

Celu

12

CenterCropPad

18

Clip

13, 12, 11, 6, 1

13/12, 13/11, 12/11, 13/6, 12/6, 11/6, 13/1, 12/1, 11/1, 6/1

Col2Im

18

Compress

11, 9

11/9

Concat

13, 11, 4, 1

13/11, 13/4, 11/4, 13/1, 11/1, 4/1

ConcatFromSequence

11

Constant

13, 12, 11, 9, 1

13/12, 13/11, 12/11, 13/9, 12/9, 11/9, 13/1, 12/1, 11/1, 9/1

ConstantOfShape

9

Conv

11, 1

11/1

ConvInteger

10

ConvTranspose

11, 1

11/1

Cos

7

Cosh

9

CumSum

14, 11

14/11

DFT

17

DepthToSpace

13, 11, 1

13/11, 13/1, 11/1

DequantizeLinear

13, 10

13/10

Det

11

Div

14, 13, 7, 6, 1

14/13, 14/7, 13/7, 14/6, 13/6, 7/6, 14/1, 13/1, 7/1, 6/1

Dropout

13, 12, 10, 7, 6, 1

13/12, 13/10, 12/10, 13/7, 12/7, 10/7, 13/6, 12/6, 10/6, 7/6, 13/1, 12/1, 10/1, 7/1, 6/1

DynamicQuantizeLinear

11

Einsum

12

Elu

6, 1

6/1

Equal

13, 11, 7, 1

13/11, 13/7, 11/7, 13/1, 11/1, 7/1

Erf

13, 9

13/9

Exp

13, 6, 1

13/6, 13/1, 6/1

Expand

13, 8

13/8

EyeLike

9

Flatten

13, 11, 9, 1

13/11, 13/9, 11/9, 13/1, 11/1, 9/1

Floor

13, 6, 1

13/6, 13/1, 6/1

GRU

14, 7, 3, 1

14/7, 14/3, 7/3, 14/1, 7/1, 3/1

Gather

13, 11, 1

13/11, 13/1, 11/1

GatherElements

13, 11

13/11

GatherND

13, 12, 11

13/12, 13/11, 12/11

Gemm

13, 11, 9, 7, 6, 1

13/11, 13/9, 11/9, 13/7, 11/7, 9/7, 13/6, 11/6, 9/6, 7/6, 13/1, 11/1, 9/1, 7/1, 6/1

GlobalAveragePool

1

GlobalLpPool

2, 1

2/1

GlobalMaxPool

1

Greater

13, 9, 7, 1

13/9, 13/7, 9/7, 13/1, 9/1, 7/1

GreaterOrEqual

16, 12

16/12

GridSample

16

HammingWindow

17

HannWindow

17

HardSigmoid

6, 1

6/1

HardSwish

14

Hardmax

13, 11, 1

13/11, 13/1, 11/1

Identity

16, 14, 13, 1

16/14, 16/13, 14/13, 16/1, 14/1, 13/1

If

16, 13, 11, 1

16/13, 16/11, 13/11, 16/1, 13/1, 11/1

InstanceNormalization

6, 1

6/1

IsInf

10

IsNaN

13, 9

13/9

LRN

13, 1

13/1

LSTM

14, 7, 1

14/7, 14/1, 7/1

LayerNormalization

17

LeakyRelu

16, 6, 1

16/6, 16/1, 6/1

Less

13, 9, 7, 1

13/9, 13/7, 9/7, 13/1, 9/1, 7/1

LessOrEqual

16, 12

16/12

Log

13, 6, 1

13/6, 13/1, 6/1

LogSoftmax

13, 11, 1

13/11, 13/1, 11/1

Loop

16, 13, 11, 1

16/13, 16/11, 13/11, 16/1, 13/1, 11/1

LpNormalization

1

LpPool

11, 2, 1

11/2, 11/1, 2/1

MatMul

13, 9, 1

13/9, 13/1, 9/1

MatMulInteger

10

Max

13, 12, 8, 6, 1

13/12, 13/8, 12/8, 13/6, 12/6, 8/6, 13/1, 12/1, 8/1, 6/1

MaxPool

12, 11, 10, 8, 1

12/11, 12/10, 11/10, 12/8, 11/8, 10/8, 12/1, 11/1, 10/1, 8/1

MaxRoiPool

1

MaxUnpool

11, 9

11/9

Mean

13, 8, 6, 1

13/8, 13/6, 8/6, 13/1, 8/1, 6/1

MeanVarianceNormalization

13, 9

13/9

MelWeightMatrix

17

Min

13, 12, 8, 6, 1

13/12, 13/8, 12/8, 13/6, 12/6, 8/6, 13/1, 12/1, 8/1, 6/1

Mish

18

Mod

13, 10

13/10

Mul

14, 13, 7, 6, 1

14/13, 14/7, 13/7, 14/6, 13/6, 7/6, 14/1, 13/1, 7/1, 6/1

Multinomial

7

Neg

13, 6, 1

13/6, 13/1, 6/1

NegativeLogLikelihoodLoss

13, 12

13/12

NonMaxSuppression

11, 10

11/10

NonZero

13, 9

13/9

Not

1

OneHot

11, 9

11/9

Optional

15

OptionalGetElement

18, 15

18/15

OptionalHasElement

18, 15

18/15

Or

7, 1

7/1

PRelu

16, 9, 7, 6, 1

16/9, 16/7, 9/7, 16/6, 9/6, 7/6, 16/1, 9/1, 7/1, 6/1

Pad

18, 13, 11, 2, 1

18/13, 18/11, 13/11, 18/2, 13/2, 11/2, 18/1, 13/1, 11/1, 2/1

Pow

15, 13, 12, 7, 1

15/13, 15/12, 13/12, 15/7, 13/7, 12/7, 15/1, 13/1, 12/1, 7/1

QLinearConv

10

QLinearMatMul

10

QuantizeLinear

13, 10

13/10

RNN

14, 7, 1

14/7, 14/1, 7/1

RandomNormal

1

RandomNormalLike

1

RandomUniform

1

RandomUniformLike

1

Range

11

Reciprocal

13, 6, 1

13/6, 13/1, 6/1

ReduceL1

13, 11, 1

13/11, 13/1, 11/1

ReduceL2

13, 11, 1

13/11, 13/1, 11/1

ReduceLogSum

13, 11, 1

13/11, 13/1, 11/1

ReduceLogSumExp

13, 11, 1

13/11, 13/1, 11/1

ReduceMax

13, 12, 11, 1

13/12, 13/11, 12/11, 13/1, 12/1, 11/1

ReduceMean

13, 11, 1

13/11, 13/1, 11/1

ReduceMin

13, 12, 11, 1

13/12, 13/11, 12/11, 13/1, 12/1, 11/1

ReduceProd

13, 11, 1

13/11, 13/1, 11/1

ReduceSum

13, 11, 1

13/11, 13/1, 11/1

ReduceSumSquare

13, 11, 1

13/11, 13/1, 11/1

Relu

14, 13, 6, 1

14/13, 14/6, 13/6, 14/1, 13/1, 6/1

Reshape

14, 13, 5, 1

14/13, 14/5, 13/5, 14/1, 13/1, 5/1

Resize

18, 13, 11, 10

18/13, 18/11, 13/11, 18/10, 13/10, 11/10

ReverseSequence

10

RoiAlign

16, 10

16/10

Round

11

STFT

17

Scan

16, 11, 9, 8

16/11, 16/9, 11/9, 16/8, 11/8, 9/8

Scatter

11, 9

11/9

ScatterElements

18, 16, 13, 11

18/16, 18/13, 16/13, 18/11, 16/11, 13/11

ScatterND

18, 16, 13, 11

18/16, 18/13, 16/13, 18/11, 16/11, 13/11

Selu

6, 1

6/1

SequenceAt

11

SequenceConstruct

11

SequenceEmpty

11

SequenceErase

11

SequenceInsert

11

SequenceLength

11

SequenceMap

17

Shape

15, 13, 1

15/13, 15/1, 13/1

Shrink

9

Sigmoid

13, 6, 1

13/6, 13/1, 6/1

Sign

13, 9

13/9

Sin

7

Sinh

9

Size

13, 1

13/1

Slice

13, 11, 10, 1

13/11, 13/10, 11/10, 13/1, 11/1, 10/1

Softmax

13, 11, 1

13/11, 13/1, 11/1

SoftmaxCrossEntropyLoss

13, 12

13/12

Softplus

1

Softsign

1

SpaceToDepth

13, 1

13/1

Split

13, 11, 2, 1

13/11, 13/2, 11/2, 13/1, 11/1, 2/1

SplitToSequence

11

Sqrt

13, 6, 1

13/6, 13/1, 6/1

Squeeze

13, 11, 1

13/11, 13/1, 11/1

StringNormalizer

10

Sub

14, 13, 7, 6, 1

14/13, 14/7, 13/7, 14/6, 13/6, 7/6, 14/1, 13/1, 7/1, 6/1

Sum

13, 8, 6, 1

13/8, 13/6, 8/6, 13/1, 8/1, 6/1

Tan

7

Tanh

13, 6, 1

13/6, 13/1, 6/1

TfIdfVectorizer

9

ThresholdedRelu

10

Tile

13, 6, 1

13/6, 13/1, 6/1

TopK

11, 10, 1

11/10, 11/1, 10/1

Transpose

13, 1

13/1

Trilu

14

Unique

11

Unsqueeze

13, 11, 1

13/11, 13/1, 11/1

Upsample

10, 9, 7, 1

10/9, 10/7, 9/7, 10/1, 9/1, 7/1

Where

16, 9

16/9

Xor

7, 1

7/1