pub enum Op {
Show 244 variants
Input,
Linear {
in_features: usize,
out_features: usize,
has_bias: bool,
},
Flatten,
BatchNorm1d {
num_features: usize,
eps: f64,
momentum: f64,
affine: bool,
track_running_stats: bool,
},
BatchNorm2d {
num_features: usize,
eps: f64,
momentum: f64,
affine: bool,
track_running_stats: bool,
},
BatchNorm3d {
num_features: usize,
eps: f64,
momentum: f64,
affine: bool,
track_running_stats: bool,
},
LayerNorm {
normalized_shape: Vec<usize>,
eps: f64,
affine: bool,
},
RmsNorm {
normalized_shape: Vec<usize>,
eps: f64,
affine: bool,
},
GroupNorm {
num_groups: usize,
num_channels: usize,
eps: f64,
affine: bool,
},
InstanceNorm1d {
num_features: usize,
eps: f64,
momentum: f64,
affine: bool,
track_running_stats: bool,
},
InstanceNorm2d {
num_features: usize,
eps: f64,
momentum: f64,
affine: bool,
track_running_stats: bool,
},
InstanceNorm3d {
num_features: usize,
eps: f64,
momentum: f64,
affine: bool,
track_running_stats: bool,
},
Conv1d {
in_channels: usize,
out_channels: usize,
kernel_l: usize,
stride: usize,
padding: usize,
has_bias: bool,
},
Conv2d {
in_channels: usize,
out_channels: usize,
kernel_h: usize,
kernel_w: usize,
stride_h: usize,
stride_w: usize,
padding_h: usize,
padding_w: usize,
groups: usize,
has_bias: bool,
},
Conv3d {
in_channels: usize,
out_channels: usize,
kernel_d: usize,
kernel_h: usize,
kernel_w: usize,
stride_d: usize,
stride_h: usize,
stride_w: usize,
padding_d: usize,
padding_h: usize,
padding_w: usize,
has_bias: bool,
},
Conv2dBnSilu {
in_channels: usize,
out_channels: usize,
kernel_h: usize,
kernel_w: usize,
stride_h: usize,
stride_w: usize,
padding_h: usize,
padding_w: usize,
groups: usize,
bn_eps: f64,
},
AvgPool1d {
kernel_l: usize,
stride: usize,
},
AvgPool2d {
kernel_h: usize,
kernel_w: usize,
stride_h: usize,
stride_w: usize,
},
AvgPool3d {
kernel_d: usize,
kernel_h: usize,
kernel_w: usize,
stride_d: usize,
stride_h: usize,
stride_w: usize,
},
MaxPool1d {
kernel_l: usize,
stride: usize,
},
MaxPool2d {
kernel_h: usize,
kernel_w: usize,
stride_h: usize,
stride_w: usize,
pad_h: usize,
pad_w: usize,
},
MaxPool3d {
kernel_d: usize,
kernel_h: usize,
kernel_w: usize,
stride_d: usize,
stride_h: usize,
stride_w: usize,
},
LpPool1d {
kernel_l: usize,
stride: usize,
p: f64,
},
LpPool2d {
kernel_h: usize,
kernel_w: usize,
stride_h: usize,
stride_w: usize,
p: f64,
},
LpPool3d {
kernel_d: usize,
kernel_h: usize,
kernel_w: usize,
stride_d: usize,
stride_h: usize,
stride_w: usize,
p: f64,
},
UpsampleNearest2d {
scale_h: usize,
scale_w: usize,
},
ConstantPad1d {
pad_left: usize,
pad_right: usize,
value: f64,
},
ConstantPad2d {
pad_l: usize,
pad_r: usize,
pad_t: usize,
pad_b: usize,
value: f64,
},
ConstantPad3d {
pad_d1: usize,
pad_d2: usize,
pad_h1: usize,
pad_h2: usize,
pad_w1: usize,
pad_w2: usize,
value: f64,
},
ReflectionPad1d {
pad_left: usize,
pad_right: usize,
},
ReflectionPad2d {
pad_l: usize,
pad_r: usize,
pad_t: usize,
pad_b: usize,
},
ReflectionPad3d {
pad_d1: usize,
pad_d2: usize,
pad_h1: usize,
pad_h2: usize,
pad_w1: usize,
pad_w2: usize,
},
ReplicationPad1d {
pad_left: usize,
pad_right: usize,
},
ReplicationPad2d {
pad_l: usize,
pad_r: usize,
pad_t: usize,
pad_b: usize,
},
ReplicationPad3d {
pad_d1: usize,
pad_d2: usize,
pad_h1: usize,
pad_h2: usize,
pad_w1: usize,
pad_w2: usize,
},
CircularPad1d {
pad_left: usize,
pad_right: usize,
},
CircularPad2d {
pad_l: usize,
pad_r: usize,
pad_t: usize,
pad_b: usize,
},
CircularPad3d {
pad_d1: usize,
pad_d2: usize,
pad_h1: usize,
pad_h2: usize,
pad_w1: usize,
pad_w2: usize,
},
Relu,
Elu {
alpha: f64,
},
Selu,
Celu {
alpha: f64,
},
Gelu,
Mish,
Hardtanh {
min_val: f64,
max_val: f64,
},
Relu6,
Hardsigmoid,
Hardswish,
Hardshrink {
lambda: f64,
},
LeakyRelu {
negative_slope: f64,
},
Threshold {
threshold: f64,
value: f64,
},
Softsign,
Softshrink {
lambda: f64,
},
Softplus {
beta: f64,
threshold: f64,
},
Sigmoid,
Silu,
Logsigmoid,
Tanh,
Tanhshrink,
Softmax {
dim: usize,
},
Attention {
c: usize,
num_heads: usize,
key_dim: usize,
},
Add,
ChannelChunk {
c_total: usize,
chunk_c: usize,
chunk_offset: usize,
},
ChannelCat {
c_total: usize,
},
ChannelBiasAdd {
c: usize,
},
Custom {
data: CustomData,
},
Abs,
Neg,
Ceil,
Floor,
Round,
Sqrt,
Reciprocal,
Exp,
Log,
Erf,
Sign,
IsNaN,
IsInf {
detect_negative: bool,
detect_positive: bool,
},
Not,
BitwiseNot,
Sin,
Cos,
Tan,
Asin,
Acos,
Atan,
Sinh,
Cosh,
Asinh,
Acosh,
Atanh,
Mul,
Sub,
Div,
Pow,
Mod {
fmod: bool,
},
ElemMin,
ElemMax,
ElemMean,
ElemSum,
Equal,
Greater,
GreaterOrEqual,
Less,
LessOrEqual,
And,
Or,
Xor,
BitwiseAnd,
BitwiseOr,
BitwiseXor,
BitShift {
direction: String,
},
Reshape,
Transpose {
perm: Vec<usize>,
},
Squeeze {
axes: Vec<i64>,
},
Unsqueeze {
axes: Vec<i64>,
},
Concat {
axis: i64,
},
Split {
axis: i64,
num_outputs: usize,
},
Slice,
Gather {
axis: i64,
},
GatherElements {
axis: i64,
},
GatherND {
batch_dims: i64,
},
ScatterElements {
axis: i64,
},
ScatterND,
Tile,
Expand,
ShapeOf {
start: i64,
end: i64,
},
SizeOf,
Identity,
Cast {
to: DtypeRepr,
},
CastLike,
Where,
Compress {
axis: i64,
},
Range,
Constant {
dtype: DtypeRepr,
shape: Shape,
},
ConstantOfShape {
dtype: DtypeRepr,
},
Trilu {
upper: bool,
},
BitCast {
to: DtypeRepr,
},
Pad {
mode: String,
},
ReverseSequence {
batch_axis: i64,
time_axis: i64,
},
NonZero,
Scatter {
axis: i64,
},
TensorScatter,
Gemm {
alpha: f64,
beta: f64,
trans_a: bool,
trans_b: bool,
},
MatMul,
MatMulInteger,
Einsum {
equation: String,
},
Det,
QLinearMatMul,
ConvTranspose {
in_channels: usize,
out_channels: usize,
kernel_h: usize,
kernel_w: usize,
stride_h: usize,
stride_w: usize,
padding_h: usize,
padding_w: usize,
output_padding_h: usize,
output_padding_w: usize,
groups: usize,
has_bias: bool,
},
ConvInteger {
groups: usize,
},
DeformConv {
group: usize,
offset_group: usize,
},
QLinearConv {
groups: usize,
},
Col2Im {
kernel_h: usize,
kernel_w: usize,
},
CausalConvWithState {
activation: String,
},
ReduceSum {
keepdims: bool,
noop_with_empty_axes: bool,
},
ReduceMean {
keepdims: bool,
noop_with_empty_axes: bool,
},
ReduceMax {
keepdims: bool,
noop_with_empty_axes: bool,
},
ReduceMin {
keepdims: bool,
noop_with_empty_axes: bool,
},
ReduceProd {
keepdims: bool,
noop_with_empty_axes: bool,
},
ReduceL1 {
keepdims: bool,
noop_with_empty_axes: bool,
},
ReduceL2 {
keepdims: bool,
noop_with_empty_axes: bool,
},
ReduceLogSum {
keepdims: bool,
noop_with_empty_axes: bool,
},
ReduceLogSumExp {
keepdims: bool,
noop_with_empty_axes: bool,
},
ReduceSumSquare {
keepdims: bool,
noop_with_empty_axes: bool,
},
CumSum {
exclusive: bool,
reverse: bool,
},
CumProd {
exclusive: bool,
reverse: bool,
},
ArgMax {
axis: i64,
keepdims: bool,
select_last_index: bool,
},
ArgMin {
axis: i64,
keepdims: bool,
select_last_index: bool,
},
GlobalAvgPool,
GlobalMaxPool,
LpNormalization {
axis: i64,
p: i64,
},
MeanVarianceNormalization {
axes: Vec<i64>,
},
LogSoftmax {
axis: i64,
},
Hardmax {
axis: i64,
},
PRelu,
ThresholdedRelu {
alpha: f64,
},
Shrink {
lambd: f64,
bias: f64,
},
Clip,
Swish,
MultiHeadAttention {
q_num_heads: usize,
kv_num_heads: usize,
},
FlexAttention {
scale: f64,
},
LinearAttention {
q_num_heads: usize,
kv_num_heads: usize,
update_rule: String,
scale: f64,
},
LRN {
alpha: f64,
beta: f64,
bias: f64,
size: usize,
},
Lstm {
hidden_size: usize,
direction: String,
bidirectional: bool,
},
Gru {
hidden_size: usize,
direction: String,
bidirectional: bool,
},
Rnn {
hidden_size: usize,
direction: String,
bidirectional: bool,
},
Resize {
mode: String,
coordinate_transformation_mode: String,
antialias: bool,
},
GridSample {
mode: String,
padding_mode: String,
align_corners: bool,
},
SpaceToDepth {
blocksize: usize,
},
DepthToSpace {
blocksize: usize,
mode: String,
},
RoiAlign {
output_h: usize,
output_w: usize,
sampling_ratio: i64,
spatial_scale: f64,
},
AffineGrid {
align_corners: bool,
},
MaxUnpool {
kernel_h: usize,
kernel_w: usize,
stride_h: usize,
stride_w: usize,
},
CenterCropPad {
axes: Vec<i64>,
},
NonMaxSuppression {
center_point_box: bool,
},
TopK {
axis: i64,
largest: bool,
sorted: bool,
},
Unique {
sorted: bool,
},
Dropout {
training_mode: bool,
},
EyeLike {
dtype: Option<DtypeRepr>,
k: i64,
},
OneHot {
axis: i64,
},
Bernoulli {
dtype: Option<DtypeRepr>,
},
RandomUniformLike {
dtype: Option<DtypeRepr>,
high: f64,
low: f64,
},
RotaryEmbedding,
QuantizeLinear {
axis: i64,
saturate: bool,
},
DequantizeLinear {
axis: i64,
},
DynamicQuantizeLinear,
Dft {
inverse: bool,
onesided: bool,
},
Stft,
MelWeightMatrix,
HannWindow {
periodic: bool,
},
BlackmanWindow {
periodic: bool,
},
HammingWindow {
periodic: bool,
},
NegativeLogLikelihoodLoss {
reduction: String,
},
SoftmaxCrossEntropyLoss {
reduction: String,
},
SequenceAt,
SequenceConstruct,
SequenceEmpty,
SequenceErase,
SequenceInsert,
SequenceLength,
SequenceMap,
SplitToSequence {
axis: i64,
keepdims: bool,
},
ConcatFromSequence {
axis: i64,
new_axis: bool,
},
OptionalGetElement,
OptionalHasElement,
Loop,
Scan {
num_scan_inputs: i64,
},
If,
Adagrad,
Adam,
Momentum,
Gradient,
StringNormalizer,
RegexFullMatch {
pattern: String,
},
StringConcat,
StringSplit,
TfIdfVectorizer,
LabelEncoder,
ArrayFeatureExtractor,
Binarizer {
threshold: f64,
},
TreeEnsemble,
ImageDecoder,
}Expand description
A single computational-graph operation. Each variant corresponds to one nn layer or
primitive op; variant fields are that op’s configuration (mirroring the corresponding
nn::* layer struct’s fields).
Variants§
Input
Model input placeholder.
Linear
Fully-connected layer (see nn::linear::Linear).
Fields
Flatten
Flattens all spatial dimensions into a single feature vector (see nn::flatten::Flatten).
BatchNorm1d
1-D batch normalization (see nn::batchnorm::BatchNorm1d).
Fields
BatchNorm2d
2-D batch normalization (see nn::batchnorm::BatchNorm2d).
Fields
BatchNorm3d
3-D batch normalization (see nn::batchnorm::BatchNorm3d).
Fields
LayerNorm
Layer normalization (see nn::layernorm::LayerNorm).
Fields
RmsNorm
RMS normalization (see nn::rmsnorm::RmsNorm).
Fields
GroupNorm
Group normalization (see nn::groupnorm::GroupNorm).
Fields
InstanceNorm1d
1-D instance normalization (see nn::instancenorm::InstanceNorm1d).
Fields
InstanceNorm2d
2-D instance normalization (see nn::instancenorm::InstanceNorm2d).
Fields
InstanceNorm3d
3-D instance normalization (see nn::instancenorm::InstanceNorm3d).
Fields
Conv1d
1-D convolution (see nn::conv1d::Conv1d).
Fields
Conv2d
2-D convolution (see nn::conv2d::Conv2d).
Fields
Conv3d
3-D convolution (see nn::conv3d::Conv3d).
Fields
Conv2dBnSilu
Fused Conv2d + BatchNorm2d (inference-only) + SiLU forward.
The BN parameters (scale, shift) are stored as precomputed affine
constants — not raw mean/var/gamma/beta. Produced by Graph::optimise()
when it detects the pattern Conv2d(no bias) → BatchNorm2d → Silu.
bn_eps is carried forward only for reference; the BN affine constants
are passed at runtime via the bn_scale and bn_shift parameters.
Fields
AvgPool1d
1-D average pooling (see nn::pool::AvgPool1d).
Fields
AvgPool2d
2-D average pooling (see nn::pool::AvgPool2d).
Fields
AvgPool3d
3-D average pooling (see nn::pool::AvgPool3d).
Fields
MaxPool1d
1-D max pooling (see nn::pool::MaxPool1d).
Fields
MaxPool2d
2-D max pooling (see nn::pool::MaxPool2d).
Fields
MaxPool3d
3-D max pooling (see nn::pool::MaxPool3d).
Fields
LpPool1d
1-D power-average (Lp) pooling (see nn::pool::LpPool1d).
Fields
LpPool2d
2-D power-average (Lp) pooling (see nn::pool::LpPool2d).
Fields
LpPool3d
3-D power-average (Lp) pooling (see nn::pool::LpPool3d).
Fields
UpsampleNearest2d
Nearest-neighbour 2-D upsampling.
Output shape: [N, C, H * scale_h, W * scale_w].
Fields
ConstantPad1d
1-D constant padding (see nn::pad::ConstantPad1d).
Fields
ConstantPad2d
2-D constant padding (see nn::pad::ConstantPad2d).
Fields
ConstantPad3d
3-D constant padding (see nn::pad::ConstantPad3d).
Fields
ReflectionPad1d
1-D reflection padding (see nn::pad::ReflectionPad1d).
ReflectionPad2d
2-D reflection padding (see nn::pad::ReflectionPad2d).
Fields
ReflectionPad3d
3-D reflection padding (see nn::pad::ReflectionPad3d).
Fields
ReplicationPad1d
1-D replication padding (see nn::pad::ReplicationPad1d).
ReplicationPad2d
2-D replication padding (see nn::pad::ReplicationPad2d).
Fields
ReplicationPad3d
3-D replication padding (see nn::pad::ReplicationPad3d).
Fields
CircularPad1d
1-D circular padding (see nn::pad::CircularPad1d).
CircularPad2d
2-D circular padding (see nn::pad::CircularPad2d).
Fields
CircularPad3d
3-D circular padding (see nn::pad::CircularPad3d).
Fields
Relu
ReLU activation (see nn::activation::relu::Relu).
Elu
ELU activation (see nn::activation::elu::Elu).
Selu
SELU activation (see nn::activation::elu::Selu).
Celu
CELU activation (see nn::activation::elu::Celu).
Gelu
GELU activation (see nn::activation::gelu::Gelu).
Mish
Mish activation (see nn::activation::gelu::Mish).
Hardtanh
Hardtanh activation (see nn::activation::hard::Hardtanh).
Relu6
ReLU6 activation (see nn::activation::hard::Relu6).
Hardsigmoid
Hard-sigmoid activation (see nn::activation::hard::Hardsigmoid).
Hardswish
Hard-swish activation (see nn::activation::hard::Hardswish).
Hardshrink
Hardshrink activation (see nn::activation::hard::Hardshrink).
LeakyRelu
Leaky ReLU activation (see nn::activation::misc::LeakyRelu).
Threshold
Threshold activation (see nn::activation::misc::Threshold).
Softsign
Softsign activation (see nn::activation::misc::Softsign).
Softshrink
Softshrink activation (see nn::activation::misc::Softshrink).
Softplus
Softplus activation (see nn::activation::misc::Softplus).
Sigmoid
Sigmoid activation (see nn::activation::sigmoid::Sigmoid).
Silu
SiLU/Swish activation (see nn::activation::sigmoid::Silu).
Logsigmoid
Log-sigmoid activation (see nn::activation::sigmoid::Logsigmoid).
Tanh
Tanh activation (see nn::activation::tanh::Tanh).
Tanhshrink
Tanhshrink activation (see nn::activation::tanh::Tanhshrink).
Softmax
Softmax activation (see nn::activation::softmax::Softmax).
Attention
Multi-head self-attention with Flash Attention 2 and position encoding.
Represents the full Attention.forward() in PSABlock:
qkv conv → FA2 → pe depthwise conv → proj conv → residual add.
Input/output shape: [N, c, H, W].
Fields
Add
Element-wise addition of two tensors with identical shapes.
ChannelChunk
Extract one contiguous channel slice from a 4-D NCHW tensor.
Output shape: [N, chunk_c, H, W].
Fields
ChannelCat
Concatenate N 4-D NCHW tensors along the channel dimension.
Output shape: [N, c_total, H, W].
ChannelBiasAdd
Adds a (C,) bias vector to a (B, C, H, W) feature map — NC layout (N=BHW). Output shape equals input shape.
Custom
User-defined op. Shape and dtype must be provided via Graph::add_node
or SymTensor::record_custom — the base system cannot infer them.
Fields
data: CustomDataThe wrapped user-defined op.
Abs
Element-wise absolute value (ONNX Abs).
Neg
Element-wise negation (ONNX Neg).
Ceil
Element-wise ceiling (ONNX Ceil).
Floor
Element-wise floor (ONNX Floor).
Round
Element-wise round-to-nearest-even (ONNX Round).
Sqrt
Element-wise square root (ONNX Sqrt).
Reciprocal
Element-wise reciprocal, 1/x (ONNX Reciprocal).
Exp
Element-wise natural exponential (ONNX Exp).
Log
Element-wise natural logarithm (ONNX Log).
Erf
Element-wise error function (ONNX Erf).
Sign
Element-wise sign (ONNX Sign).
IsNaN
Element-wise NaN test (ONNX IsNaN).
IsInf
Element-wise infinity test (ONNX IsInf).
Fields
Not
Element-wise logical NOT (ONNX Not).
BitwiseNot
Element-wise bitwise NOT (ONNX BitwiseNot).
Sin
Element-wise sine (ONNX Sin).
Cos
Element-wise cosine (ONNX Cos).
Tan
Element-wise tangent (ONNX Tan).
Asin
Element-wise arcsine (ONNX Asin).
Acos
Element-wise arccosine (ONNX Acos).
Atan
Element-wise arctangent (ONNX Atan).
Sinh
Element-wise hyperbolic sine (ONNX Sinh).
Cosh
Element-wise hyperbolic cosine (ONNX Cosh).
Asinh
Element-wise inverse hyperbolic sine (ONNX Asinh).
Acosh
Element-wise inverse hyperbolic cosine (ONNX Acosh).
Atanh
Element-wise inverse hyperbolic tangent (ONNX Atanh).
Mul
Element-wise multiplication (ONNX Mul).
Sub
Element-wise subtraction (ONNX Sub).
Div
Element-wise division (ONNX Div).
Pow
Element-wise exponentiation (ONNX Pow).
Mod
Element-wise modulo (ONNX Mod).
ElemMin
Element-wise minimum across inputs (ONNX Min).
ElemMax
Element-wise maximum across inputs (ONNX Max).
ElemMean
Element-wise mean across inputs (ONNX Mean).
ElemSum
Element-wise sum across inputs (ONNX Sum).
Equal
Element-wise equality (ONNX Equal).
Greater
Element-wise greater-than (ONNX Greater).
GreaterOrEqual
Element-wise greater-than-or-equal (ONNX GreaterOrEqual).
Less
Element-wise less-than (ONNX Less).
LessOrEqual
Element-wise less-than-or-equal (ONNX LessOrEqual).
And
Element-wise logical AND (ONNX And).
Or
Element-wise logical OR (ONNX Or).
Xor
Element-wise logical XOR (ONNX Xor).
BitwiseAnd
Element-wise bitwise AND (ONNX BitwiseAnd).
BitwiseOr
Element-wise bitwise OR (ONNX BitwiseOr).
BitwiseXor
Element-wise bitwise XOR (ONNX BitwiseXor).
BitShift
Element-wise bit shift (ONNX BitShift).
Reshape
Reshapes a tensor without changing its data (ONNX Reshape).
Transpose
Permutes a tensor’s dimensions (ONNX Transpose).
Squeeze
Removes size-1 dimensions (ONNX Squeeze).
Unsqueeze
Inserts size-1 dimensions (ONNX Unsqueeze).
Concat
Concatenates tensors along an axis (ONNX Concat).
Split
Splits a tensor into multiple outputs along an axis (ONNX Split).
Slice
Extracts a slice of a tensor (ONNX Slice).
Gather
Gathers slices along an axis using an index tensor (ONNX Gather).
GatherElements
Gathers individual elements along an axis (ONNX GatherElements).
GatherND
Gathers slices using N-D indices (ONNX GatherND).
ScatterElements
Scatters individual elements along an axis (ONNX ScatterElements).
ScatterND
Scatters slices using N-D indices (ONNX ScatterND).
Tile
Tiles a tensor by repeating it (ONNX Tile).
Expand
Broadcasts a tensor to a larger shape (ONNX Expand).
ShapeOf
Returns a tensor’s shape as a 1-D tensor (ONNX Shape).
SizeOf
Returns the total number of elements (ONNX Size).
Identity
Passes the input through unchanged (ONNX Identity).
Cast
Casts a tensor to another dtype (ONNX Cast).
CastLike
Casts a tensor to match another tensor’s dtype (ONNX CastLike).
Where
Element-wise conditional selection (ONNX Where).
Compress
Selects slices along an axis using a boolean mask (ONNX Compress).
Range
Generates a range of values (ONNX Range).
Constant
Constant tensor (value embedded in the ONNX model).
ConstantOfShape
Creates a constant-filled tensor of a given shape (ONNX ConstantOfShape).
Trilu
Extracts the upper or lower triangular part of a matrix (ONNX Trilu).
BitCast
Reinterprets a tensor’s bits as another dtype without conversion.
Pad
Generic padding (ONNX Pad).
ReverseSequence
Reverses variable-length sequences along an axis (ONNX ReverseSequence).
NonZero
Returns the indices of non-zero elements (ONNX NonZero).
Scatter
Scatters values along an axis (deprecated ONNX Scatter, superseded by ScatterElements).
TensorScatter
Scatters an entire tensor into another at given indices.
Gemm
General matrix multiply: alpha * A @ B + beta * C (ONNX Gemm).
Fields
MatMul
Matrix multiplication (ONNX MatMul).
MatMulInteger
Integer matrix multiplication (ONNX MatMulInteger).
Einsum
Einstein-summation contraction (ONNX Einsum).
Det
Matrix determinant (ONNX Det).
QLinearMatMul
Quantized linear matrix multiplication (ONNX QLinearMatMul).
ConvTranspose
Transposed (deconvolution) 2-D convolution (ONNX ConvTranspose).
Fields
ConvInteger
Integer convolution (ONNX ConvInteger).
DeformConv
Deformable convolution (ONNX DeformConv).
Fields
QLinearConv
Quantized linear convolution (ONNX QLinearConv).
Col2Im
Combines sliding local blocks into a large tensor (ONNX Col2Im, inverse of im2col).
Fields
CausalConvWithState
Stateful causal 1-D convolution, carrying a sliding-window state between calls (ONNX
CausalConvWithState).
Fields
ReduceSum
Sum reduction along axes (ONNX ReduceSum).
Fields
ReduceMean
Mean reduction along axes (ONNX ReduceMean).
Fields
ReduceMax
Max reduction along axes (ONNX ReduceMax).
Fields
ReduceMin
Min reduction along axes (ONNX ReduceMin).
Fields
ReduceProd
Product reduction along axes (ONNX ReduceProd).
Fields
ReduceL1
L1-norm reduction along axes (ONNX ReduceL1).
Fields
ReduceL2
L2-norm reduction along axes (ONNX ReduceL2).
Fields
ReduceLogSum
Log-sum reduction along axes (ONNX ReduceLogSum).
Fields
ReduceLogSumExp
Log-sum-exp reduction along axes (ONNX ReduceLogSumExp).
Fields
ReduceSumSquare
Sum-of-squares reduction along axes (ONNX ReduceSumSquare).
Fields
CumSum
Cumulative sum along an axis (ONNX CumSum).
Fields
CumProd
Cumulative product along an axis (ONNX CumProd).
Fields
ArgMax
Index of the maximum along an axis (ONNX ArgMax).
Fields
ArgMin
Index of the minimum along an axis (ONNX ArgMin).
Fields
GlobalAvgPool
Average-pools over the entire spatial extent (ONNX GlobalAveragePool).
GlobalMaxPool
Max-pools over the entire spatial extent (ONNX GlobalMaxPool).
LpNormalization
Lp-norm normalization along an axis (ONNX LpNormalization).
MeanVarianceNormalization
Mean/variance normalization along axes (ONNX MeanVarianceNormalization).
LogSoftmax
Log-softmax along an axis (ONNX LogSoftmax).
Hardmax
One-hot of the argmax along an axis (ONNX Hardmax).
PRelu
Parametric ReLU, with a learned per-channel slope (ONNX PRelu).
ThresholdedRelu
ReLU that zeroes values at or below alpha (ONNX ThresholdedRelu).
Shrink
Shrinks values toward zero by lambd, with a bias offset (ONNX Shrink).
Clip
Clamps values to a [min, max] range (ONNX Clip).
Swish
Swish/SiLU activation (ONNX Swish).
MultiHeadAttention
Multi-head attention (ONNX MultiHeadAttention).
Fields
FlexAttention
Attention with a user-defined score-modification function (ONNX FlexAttention). The
score-modification subgraph itself is not captured (consistent with Loop/If/Scan
not capturing their subgraph bodies).
LinearAttention
Linear-complexity attention (e.g. gated delta rule variants), optionally carrying state
between calls (ONNX LinearAttention).
Fields
LRN
Local response normalization (ONNX LRN).
Fields
Lstm
Long short-term memory recurrent layer (ONNX LSTM).
Fields
Size of the hidden state.
Gru
Gated recurrent unit layer (ONNX GRU).
Fields
Size of the hidden state.
Rnn
Simple recurrent layer (ONNX RNN).
Fields
Size of the hidden state.
Resize
Resizes a tensor (interpolation) (ONNX Resize).
Fields
GridSample
Samples a tensor at grid-specified locations (ONNX GridSample).
Fields
SpaceToDepth
Rearranges spatial blocks into depth/channels (ONNX SpaceToDepth).
DepthToSpace
Rearranges depth/channels into spatial blocks (ONNX DepthToSpace).
Fields
RoiAlign
Region-of-interest pooling with bilinear alignment (ONNX RoiAlign).
Fields
AffineGrid
Generates a 2-D/3-D sampling grid from an affine matrix (ONNX AffineGrid).
Fields
MaxUnpool
Inverse of max pooling, using stored indices (ONNX MaxUnpool).
Fields
CenterCropPad
Crops or pads a tensor to a target shape, centered (ONNX CenterCropPad).
NonMaxSuppression
Filters overlapping boxes by score (ONNX NonMaxSuppression).
Fields
TopK
Returns the top-K values/indices along an axis (ONNX TopK).
Fields
Unique
Returns unique elements (ONNX Unique).
Dropout
Dropout regularization (ONNX Dropout).
EyeLike
Creates an identity-like 2-D tensor (ONNX EyeLike).
OneHot
One-hot encodes indices along an axis (ONNX OneHot).
Bernoulli
Samples from a Bernoulli distribution using input probabilities (ONNX Bernoulli).
RandomUniformLike
Samples uniform random values with another tensor’s shape (ONNX RandomUniformLike).
Fields
RotaryEmbedding
Rotary position embedding (ONNX RotaryEmbedding).
QuantizeLinear
Linear quantization to a lower-precision dtype (ONNX QuantizeLinear).
Fields
DequantizeLinear
Linear dequantization back to a floating-point dtype (ONNX DequantizeLinear).
DynamicQuantizeLinear
Dynamically computes quantization parameters and quantizes (ONNX DynamicQuantizeLinear).
Dft
Discrete Fourier transform (ONNX DFT).
Fields
Stft
Short-time Fourier transform (ONNX STFT).
MelWeightMatrix
Generates a mel-scale filterbank matrix (ONNX MelWeightMatrix).
HannWindow
Generates a Hann window (ONNX HannWindow).
BlackmanWindow
Generates a Blackman window (ONNX BlackmanWindow).
HammingWindow
Generates a Hamming window (ONNX HammingWindow).
NegativeLogLikelihoodLoss
Negative log-likelihood loss (ONNX NegativeLogLikelihoodLoss).
Fields
SoftmaxCrossEntropyLoss
Softmax + cross-entropy loss (ONNX SoftmaxCrossEntropyLoss).
Fields
SequenceAt
Indexes into a sequence (ONNX SequenceAt).
SequenceConstruct
Constructs a sequence from tensors (ONNX SequenceConstruct).
SequenceEmpty
Constructs an empty sequence (ONNX SequenceEmpty).
SequenceErase
Removes an element from a sequence (ONNX SequenceErase).
SequenceInsert
Inserts an element into a sequence (ONNX SequenceInsert).
SequenceLength
Returns a sequence’s length (ONNX SequenceLength).
SequenceMap
Applies a subgraph to each element of a sequence (ONNX SequenceMap).
SplitToSequence
Splits a tensor into a sequence along an axis (ONNX SplitToSequence).
Fields
ConcatFromSequence
Concatenates a sequence’s elements into one tensor (ONNX ConcatFromSequence).
Fields
OptionalGetElement
Extracts the value from an optional (ONNX OptionalGetElement).
OptionalHasElement
Tests whether an optional has a value (ONNX OptionalHasElement).
Loop
Generic looping construct over a subgraph (ONNX Loop).
Scan
Applies a subgraph iteratively over input sequences (ONNX Scan).
If
Conditional branch over subgraphs (ONNX If).
Adagrad
Adagrad optimizer step (ONNX Adagrad).
Adam
Adam optimizer step (ONNX Adam).
Momentum
Momentum optimizer step (ONNX Momentum).
Gradient
Computes gradients of a subgraph (ONNX Gradient).
StringNormalizer
Normalizes strings (case folding, stop-word removal) (ONNX StringNormalizer).
RegexFullMatch
Tests strings against a regex (ONNX RegexFullMatch).
StringConcat
Concatenates strings element-wise (ONNX StringConcat).
StringSplit
Splits strings on a delimiter (ONNX StringSplit).
TfIdfVectorizer
Computes TF-IDF n-gram features (ONNX TfIdfVectorizer).
LabelEncoder
Maps categorical labels to/from encoded values (ONNX LabelEncoder).
ArrayFeatureExtractor
Selects elements from a tensor by index (ONNX-ML ArrayFeatureExtractor).
Binarizer
Binarizes values against a threshold (ONNX-ML Binarizer).
TreeEnsemble
Decision-tree ensemble inference (ONNX-ML TreeEnsemble).
ImageDecoder
Decodes an encoded image (e.g. PNG/JPEG) into a tensor (ONNX ImageDecoder).