Skip to main content

Op

Enum Op 

Source
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

§in_features: usize

Size of the last input dimension.

§out_features: usize

Size of the last output dimension.

§has_bias: bool

Whether a learned bias is added.

§

Flatten

Flattens all spatial dimensions into a single feature vector (see nn::flatten::Flatten).

§

BatchNorm1d

1-D batch normalization (see nn::batchnorm::BatchNorm1d).

Fields

§num_features: usize

Number of channels/features.

§eps: f64

Numerical stability constant.

§momentum: f64

Running-stats exponential moving average weight.

§affine: bool

Whether to learn per-channel scale/shift parameters.

§track_running_stats: bool

Whether to maintain running mean/variance across batches.

§

BatchNorm2d

2-D batch normalization (see nn::batchnorm::BatchNorm2d).

Fields

§num_features: usize

Number of channels/features.

§eps: f64

Numerical stability constant.

§momentum: f64

Running-stats exponential moving average weight.

§affine: bool

Whether to learn per-channel scale/shift parameters.

§track_running_stats: bool

Whether to maintain running mean/variance across batches.

§

BatchNorm3d

3-D batch normalization (see nn::batchnorm::BatchNorm3d).

Fields

§num_features: usize

Number of channels/features.

§eps: f64

Numerical stability constant.

§momentum: f64

Running-stats exponential moving average weight.

§affine: bool

Whether to learn per-channel scale/shift parameters.

§track_running_stats: bool

Whether to maintain running mean/variance across batches.

§

LayerNorm

Layer normalization (see nn::layernorm::LayerNorm).

Fields

§normalized_shape: Vec<usize>

Shape of the trailing axes to normalize over.

§eps: f64

Numerical stability constant.

§affine: bool

Whether to learn per-channel scale/shift parameters.

§

RmsNorm

RMS normalization (see nn::rmsnorm::RmsNorm).

Fields

§normalized_shape: Vec<usize>

Shape of the trailing axes to normalize over.

§eps: f64

Numerical stability constant.

§affine: bool

Whether to learn per-channel scale/shift parameters.

§

GroupNorm

Group normalization (see nn::groupnorm::GroupNorm).

Fields

§num_groups: usize

Number of groups.

§num_channels: usize

Number of channels.

§eps: f64

Numerical stability constant.

§affine: bool

Whether to learn per-channel scale/shift parameters.

§

InstanceNorm1d

1-D instance normalization (see nn::instancenorm::InstanceNorm1d).

Fields

§num_features: usize

Number of channels/features.

§eps: f64

Numerical stability constant.

§momentum: f64

Running-stats exponential moving average weight.

§affine: bool

Whether to learn per-channel scale/shift parameters.

§track_running_stats: bool

Whether to maintain running mean/variance across batches.

§

InstanceNorm2d

2-D instance normalization (see nn::instancenorm::InstanceNorm2d).

Fields

§num_features: usize

Number of channels/features.

§eps: f64

Numerical stability constant.

§momentum: f64

Running-stats exponential moving average weight.

§affine: bool

Whether to learn per-channel scale/shift parameters.

§track_running_stats: bool

Whether to maintain running mean/variance across batches.

§

InstanceNorm3d

3-D instance normalization (see nn::instancenorm::InstanceNorm3d).

Fields

§num_features: usize

Number of channels/features.

§eps: f64

Numerical stability constant.

§momentum: f64

Running-stats exponential moving average weight.

§affine: bool

Whether to learn per-channel scale/shift parameters.

§track_running_stats: bool

Whether to maintain running mean/variance across batches.

§

Conv1d

1-D convolution (see nn::conv1d::Conv1d).

Fields

§in_channels: usize

Number of input channels.

§out_channels: usize

Number of output channels.

§kernel_l: usize

Convolution/pooling kernel length.

§stride: usize

Stride between kernel applications.

§padding: usize

Zero-padding applied to the input.

§has_bias: bool

Whether a learned bias is added.

§

Conv2d

2-D convolution (see nn::conv2d::Conv2d).

Fields

§in_channels: usize

Number of input channels.

§out_channels: usize

Number of output channels.

§kernel_h: usize

Convolution/pooling kernel height.

§kernel_w: usize

Convolution/pooling kernel width.

§stride_h: usize

Vertical stride.

§stride_w: usize

Horizontal stride.

§padding_h: usize

Vertical zero-padding.

§padding_w: usize

Horizontal zero-padding.

§groups: usize

Number of blocked/grouped connections (1 = standard).

§has_bias: bool

Whether a learned bias is added.

§

Conv3d

3-D convolution (see nn::conv3d::Conv3d).

Fields

§in_channels: usize

Number of input channels.

§out_channels: usize

Number of output channels.

§kernel_d: usize

Convolution/pooling kernel depth.

§kernel_h: usize

Convolution/pooling kernel height.

§kernel_w: usize

Convolution/pooling kernel width.

§stride_d: usize

Stride along the depth dimension.

§stride_h: usize

Vertical stride.

§stride_w: usize

Horizontal stride.

§padding_d: usize

Zero-padding along the depth dimension.

§padding_h: usize

Vertical zero-padding.

§padding_w: usize

Horizontal zero-padding.

§has_bias: bool

Whether a learned bias is added.

§

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

§in_channels: usize

Number of input channels.

§out_channels: usize

Number of output channels.

§kernel_h: usize

Convolution/pooling kernel height.

§kernel_w: usize

Convolution/pooling kernel width.

§stride_h: usize

Vertical stride.

§stride_w: usize

Horizontal stride.

§padding_h: usize

Vertical zero-padding.

§padding_w: usize

Horizontal zero-padding.

§groups: usize

Number of blocked/grouped connections (1 = standard).

§bn_eps: f64

The fused BatchNorm’s numerical stability constant (kept for reference only; the affine constants are passed at runtime via bn_scale/bn_shift).

§

AvgPool1d

1-D average pooling (see nn::pool::AvgPool1d).

Fields

§kernel_l: usize

Convolution/pooling kernel length.

§stride: usize

Stride between kernel applications.

§

AvgPool2d

2-D average pooling (see nn::pool::AvgPool2d).

Fields

§kernel_h: usize

Convolution/pooling kernel height.

§kernel_w: usize

Convolution/pooling kernel width.

§stride_h: usize

Vertical stride.

§stride_w: usize

Horizontal stride.

§

AvgPool3d

3-D average pooling (see nn::pool::AvgPool3d).

Fields

§kernel_d: usize

Convolution/pooling kernel depth.

§kernel_h: usize

Convolution/pooling kernel height.

§kernel_w: usize

Convolution/pooling kernel width.

§stride_d: usize

Stride along the depth dimension.

§stride_h: usize

Vertical stride.

§stride_w: usize

Horizontal stride.

§

MaxPool1d

1-D max pooling (see nn::pool::MaxPool1d).

Fields

§kernel_l: usize

Convolution/pooling kernel length.

§stride: usize

Stride between kernel applications.

§

MaxPool2d

2-D max pooling (see nn::pool::MaxPool2d).

Fields

§kernel_h: usize

Convolution/pooling kernel height.

§kernel_w: usize

Convolution/pooling kernel width.

§stride_h: usize

Vertical stride.

§stride_w: usize

Horizontal stride.

§pad_h: usize

Vertical padding.

§pad_w: usize

Horizontal padding.

§

MaxPool3d

3-D max pooling (see nn::pool::MaxPool3d).

Fields

§kernel_d: usize

Convolution/pooling kernel depth.

§kernel_h: usize

Convolution/pooling kernel height.

§kernel_w: usize

Convolution/pooling kernel width.

§stride_d: usize

Stride along the depth dimension.

§stride_h: usize

Vertical stride.

§stride_w: usize

Horizontal stride.

§

LpPool1d

1-D power-average (Lp) pooling (see nn::pool::LpPool1d).

Fields

§kernel_l: usize

Convolution/pooling kernel length.

§stride: usize

Stride between kernel applications.

§p: f64

The p in the p-norm.

§

LpPool2d

2-D power-average (Lp) pooling (see nn::pool::LpPool2d).

Fields

§kernel_h: usize

Convolution/pooling kernel height.

§kernel_w: usize

Convolution/pooling kernel width.

§stride_h: usize

Vertical stride.

§stride_w: usize

Horizontal stride.

§p: f64

The p in the p-norm.

§

LpPool3d

3-D power-average (Lp) pooling (see nn::pool::LpPool3d).

Fields

§kernel_d: usize

Convolution/pooling kernel depth.

§kernel_h: usize

Convolution/pooling kernel height.

§kernel_w: usize

Convolution/pooling kernel width.

§stride_d: usize

Stride along the depth dimension.

§stride_h: usize

Vertical stride.

§stride_w: usize

Horizontal stride.

§p: f64

The p in the p-norm.

§

UpsampleNearest2d

Nearest-neighbour 2-D upsampling. Output shape: [N, C, H * scale_h, W * scale_w].

Fields

§scale_h: usize

Vertical upsampling scale factor.

§scale_w: usize

Horizontal upsampling scale factor.

§

ConstantPad1d

1-D constant padding (see nn::pad::ConstantPad1d).

Fields

§pad_left: usize

Left padding.

§pad_right: usize

Right padding.

§value: f64

The constant fill value.

§

ConstantPad2d

2-D constant padding (see nn::pad::ConstantPad2d).

Fields

§pad_l: usize

Left padding.

§pad_r: usize

Right padding.

§pad_t: usize

Top padding.

§pad_b: usize

Bottom padding.

§value: f64

The constant fill value.

§

ConstantPad3d

3-D constant padding (see nn::pad::ConstantPad3d).

Fields

§pad_d1: usize

Padding before the depth dimension.

§pad_d2: usize

Padding after the depth dimension.

§pad_h1: usize

Padding before the height dimension.

§pad_h2: usize

Padding after the height dimension.

§pad_w1: usize

Padding before the width dimension.

§pad_w2: usize

Padding after the width dimension.

§value: f64

The constant fill value.

§

ReflectionPad1d

1-D reflection padding (see nn::pad::ReflectionPad1d).

Fields

§pad_left: usize

Left padding.

§pad_right: usize

Right padding.

§

ReflectionPad2d

2-D reflection padding (see nn::pad::ReflectionPad2d).

Fields

§pad_l: usize

Left padding.

§pad_r: usize

Right padding.

§pad_t: usize

Top padding.

§pad_b: usize

Bottom padding.

§

ReflectionPad3d

3-D reflection padding (see nn::pad::ReflectionPad3d).

Fields

§pad_d1: usize

Padding before the depth dimension.

§pad_d2: usize

Padding after the depth dimension.

§pad_h1: usize

Padding before the height dimension.

§pad_h2: usize

Padding after the height dimension.

§pad_w1: usize

Padding before the width dimension.

§pad_w2: usize

Padding after the width dimension.

§

ReplicationPad1d

1-D replication padding (see nn::pad::ReplicationPad1d).

Fields

§pad_left: usize

Left padding.

§pad_right: usize

Right padding.

§

ReplicationPad2d

2-D replication padding (see nn::pad::ReplicationPad2d).

Fields

§pad_l: usize

Left padding.

§pad_r: usize

Right padding.

§pad_t: usize

Top padding.

§pad_b: usize

Bottom padding.

§

ReplicationPad3d

3-D replication padding (see nn::pad::ReplicationPad3d).

Fields

§pad_d1: usize

Padding before the depth dimension.

§pad_d2: usize

Padding after the depth dimension.

§pad_h1: usize

Padding before the height dimension.

§pad_h2: usize

Padding after the height dimension.

§pad_w1: usize

Padding before the width dimension.

§pad_w2: usize

Padding after the width dimension.

§

CircularPad1d

1-D circular padding (see nn::pad::CircularPad1d).

Fields

§pad_left: usize

Left padding.

§pad_right: usize

Right padding.

§

CircularPad2d

2-D circular padding (see nn::pad::CircularPad2d).

Fields

§pad_l: usize

Left padding.

§pad_r: usize

Right padding.

§pad_t: usize

Top padding.

§pad_b: usize

Bottom padding.

§

CircularPad3d

3-D circular padding (see nn::pad::CircularPad3d).

Fields

§pad_d1: usize

Padding before the depth dimension.

§pad_d2: usize

Padding after the depth dimension.

§pad_h1: usize

Padding before the height dimension.

§pad_h2: usize

Padding after the height dimension.

§pad_w1: usize

Padding before the width dimension.

§pad_w2: usize

Padding after the width dimension.

§

Relu

ReLU activation (see nn::activation::relu::Relu).

§

Elu

ELU activation (see nn::activation::elu::Elu).

Fields

§alpha: f64

The alpha parameter.

§

Selu

SELU activation (see nn::activation::elu::Selu).

§

Celu

CELU activation (see nn::activation::elu::Celu).

Fields

§alpha: f64

The alpha parameter.

§

Gelu

GELU activation (see nn::activation::gelu::Gelu).

§

Mish

Mish activation (see nn::activation::gelu::Mish).

§

Hardtanh

Hardtanh activation (see nn::activation::hard::Hardtanh).

Fields

§min_val: f64

The lower clamp bound.

§max_val: f64

The upper clamp bound.

§

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).

Fields

§lambda: f64

The shrinkage threshold.

§

LeakyRelu

Leaky ReLU activation (see nn::activation::misc::LeakyRelu).

Fields

§negative_slope: f64

The slope applied to negative inputs.

§

Threshold

Threshold activation (see nn::activation::misc::Threshold).

Fields

§threshold: f64

The threshold value.

§value: f64

The constant fill value.

§

Softsign

Softsign activation (see nn::activation::misc::Softsign).

§

Softshrink

Softshrink activation (see nn::activation::misc::Softshrink).

Fields

§lambda: f64

The shrinkage threshold.

§

Softplus

Softplus activation (see nn::activation::misc::Softplus).

Fields

§beta: f64

The beta parameter.

§threshold: f64

The threshold value.

§

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).

Fields

§dim: usize

The dimension to operate along.

§

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

§c: usize

Number of channels.

§num_heads: usize

Number of attention heads.

§key_dim: usize

Per-head key/query dimension.

§

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

§c_total: usize

Total number of channels across all inputs/outputs.

§chunk_c: usize

Number of channels in this chunk.

§chunk_offset: usize

Channel offset of this chunk within the total.

§

ChannelCat

Concatenate N 4-D NCHW tensors along the channel dimension. Output shape: [N, c_total, H, W].

Fields

§c_total: usize

Total number of channels across all inputs/outputs.

§

ChannelBiasAdd

Adds a (C,) bias vector to a (B, C, H, W) feature map — NC layout (N=BHW). Output shape equals input shape.

Fields

§c: usize

Number of channels.

§

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: CustomData

The 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

§detect_negative: bool

Whether to treat negative infinity as infinite.

§detect_positive: bool

Whether to treat positive infinity as infinite.

§

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).

Fields

§fmod: bool

Whether to use C-style (fmod) semantics instead of Python-style modulo.

§

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).

Fields

§direction: String

Direction of iteration/shift (e.g. "forward", "reverse", "bidirectional").

§

Reshape

Reshapes a tensor without changing its data (ONNX Reshape).

§

Transpose

Permutes a tensor’s dimensions (ONNX Transpose).

Fields

§perm: Vec<usize>

The output permutation of input dimensions.

§

Squeeze

Removes size-1 dimensions (ONNX Squeeze).

Fields

§axes: Vec<i64>

The axes to operate along.

§

Unsqueeze

Inserts size-1 dimensions (ONNX Unsqueeze).

Fields

§axes: Vec<i64>

The axes to operate along.

§

Concat

Concatenates tensors along an axis (ONNX Concat).

Fields

§axis: i64

The axis to operate along.

§

Split

Splits a tensor into multiple outputs along an axis (ONNX Split).

Fields

§axis: i64

The axis to operate along.

§num_outputs: usize

Number of outputs to split into.

§

Slice

Extracts a slice of a tensor (ONNX Slice).

§

Gather

Gathers slices along an axis using an index tensor (ONNX Gather).

Fields

§axis: i64

The axis to operate along.

§

GatherElements

Gathers individual elements along an axis (ONNX GatherElements).

Fields

§axis: i64

The axis to operate along.

§

GatherND

Gathers slices using N-D indices (ONNX GatherND).

Fields

§batch_dims: i64

Number of leading batch dimensions.

§

ScatterElements

Scatters individual elements along an axis (ONNX ScatterElements).

Fields

§axis: i64

The axis to operate along.

§

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).

Fields

§start: i64

Start index.

§end: i64

End index.

§

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).

Fields

§to: DtypeRepr

Target dtype.

§

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).

Fields

§axis: i64

The axis to operate along.

§

Range

Generates a range of values (ONNX Range).

§

Constant

Constant tensor (value embedded in the ONNX model).

Fields

§dtype: DtypeRepr

The dtype to use.

§shape: Shape

The tensor shape.

§

ConstantOfShape

Creates a constant-filled tensor of a given shape (ONNX ConstantOfShape).

Fields

§dtype: DtypeRepr

The dtype to use.

§

Trilu

Extracts the upper or lower triangular part of a matrix (ONNX Trilu).

Fields

§upper: bool

Whether to keep the upper (vs. lower) triangular part.

§

BitCast

Reinterprets a tensor’s bits as another dtype without conversion.

Fields

§to: DtypeRepr

Target dtype.

§

Pad

Generic padding (ONNX Pad).

Fields

§mode: String

The mode string selecting op-specific behavior.

§

ReverseSequence

Reverses variable-length sequences along an axis (ONNX ReverseSequence).

Fields

§batch_axis: i64

The batch axis.

§time_axis: i64

The time axis.

§

NonZero

Returns the indices of non-zero elements (ONNX NonZero).

§

Scatter

Scatters values along an axis (deprecated ONNX Scatter, superseded by ScatterElements).

Fields

§axis: i64

The axis to operate along.

§

TensorScatter

Scatters an entire tensor into another at given indices.

§

Gemm

General matrix multiply: alpha * A @ B + beta * C (ONNX Gemm).

Fields

§alpha: f64

The alpha parameter.

§beta: f64

The beta parameter.

§trans_a: bool

Whether to transpose the first matrix operand.

§trans_b: bool

Whether to transpose the second matrix operand.

§

MatMul

Matrix multiplication (ONNX MatMul).

§

MatMulInteger

Integer matrix multiplication (ONNX MatMulInteger).

§

Einsum

Einstein-summation contraction (ONNX Einsum).

Fields

§equation: String

The Einstein-summation equation string.

§

Det

Matrix determinant (ONNX Det).

§

QLinearMatMul

Quantized linear matrix multiplication (ONNX QLinearMatMul).

§

ConvTranspose

Transposed (deconvolution) 2-D convolution (ONNX ConvTranspose).

Fields

§in_channels: usize

Number of input channels.

§out_channels: usize

Number of output channels.

§kernel_h: usize

Convolution/pooling kernel height.

§kernel_w: usize

Convolution/pooling kernel width.

§stride_h: usize

Vertical stride.

§stride_w: usize

Horizontal stride.

§padding_h: usize

Vertical zero-padding.

§padding_w: usize

Horizontal zero-padding.

§output_padding_h: usize

Additional vertical padding added to the output (transposed convolution).

§output_padding_w: usize

Additional horizontal padding added to the output (transposed convolution).

§groups: usize

Number of blocked/grouped connections (1 = standard).

§has_bias: bool

Whether a learned bias is added.

§

ConvInteger

Integer convolution (ONNX ConvInteger).

Fields

§groups: usize

Number of blocked/grouped connections (1 = standard).

§

DeformConv

Deformable convolution (ONNX DeformConv).

Fields

§group: usize

Number of blocked/grouped connections (1 = standard).

§offset_group: usize

Number of groups for deformable-convolution offset channels.

§

QLinearConv

Quantized linear convolution (ONNX QLinearConv).

Fields

§groups: usize

Number of blocked/grouped connections (1 = standard).

§

Col2Im

Combines sliding local blocks into a large tensor (ONNX Col2Im, inverse of im2col).

Fields

§kernel_h: usize

Convolution/pooling kernel height.

§kernel_w: usize

Convolution/pooling kernel width.

§

CausalConvWithState

Stateful causal 1-D convolution, carrying a sliding-window state between calls (ONNX CausalConvWithState).

Fields

§activation: String

Name of the activation function applied after the convolution (empty = none).

§

ReduceSum

Sum reduction along axes (ONNX ReduceSum).

Fields

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§noop_with_empty_axes: bool

Whether an empty axes list means “no-op” instead of “reduce all”.

§

ReduceMean

Mean reduction along axes (ONNX ReduceMean).

Fields

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§noop_with_empty_axes: bool

Whether an empty axes list means “no-op” instead of “reduce all”.

§

ReduceMax

Max reduction along axes (ONNX ReduceMax).

Fields

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§noop_with_empty_axes: bool

Whether an empty axes list means “no-op” instead of “reduce all”.

§

ReduceMin

Min reduction along axes (ONNX ReduceMin).

Fields

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§noop_with_empty_axes: bool

Whether an empty axes list means “no-op” instead of “reduce all”.

§

ReduceProd

Product reduction along axes (ONNX ReduceProd).

Fields

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§noop_with_empty_axes: bool

Whether an empty axes list means “no-op” instead of “reduce all”.

§

ReduceL1

L1-norm reduction along axes (ONNX ReduceL1).

Fields

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§noop_with_empty_axes: bool

Whether an empty axes list means “no-op” instead of “reduce all”.

§

ReduceL2

L2-norm reduction along axes (ONNX ReduceL2).

Fields

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§noop_with_empty_axes: bool

Whether an empty axes list means “no-op” instead of “reduce all”.

§

ReduceLogSum

Log-sum reduction along axes (ONNX ReduceLogSum).

Fields

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§noop_with_empty_axes: bool

Whether an empty axes list means “no-op” instead of “reduce all”.

§

ReduceLogSumExp

Log-sum-exp reduction along axes (ONNX ReduceLogSumExp).

Fields

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§noop_with_empty_axes: bool

Whether an empty axes list means “no-op” instead of “reduce all”.

§

ReduceSumSquare

Sum-of-squares reduction along axes (ONNX ReduceSumSquare).

Fields

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§noop_with_empty_axes: bool

Whether an empty axes list means “no-op” instead of “reduce all”.

§

CumSum

Cumulative sum along an axis (ONNX CumSum).

Fields

§exclusive: bool

Whether to exclude the current element from the cumulative result.

§reverse: bool

Whether to accumulate in reverse order.

§

CumProd

Cumulative product along an axis (ONNX CumProd).

Fields

§exclusive: bool

Whether to exclude the current element from the cumulative result.

§reverse: bool

Whether to accumulate in reverse order.

§

ArgMax

Index of the maximum along an axis (ONNX ArgMax).

Fields

§axis: i64

The axis to operate along.

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§select_last_index: bool

Whether ties select the last (rather than first) matching index.

§

ArgMin

Index of the minimum along an axis (ONNX ArgMin).

Fields

§axis: i64

The axis to operate along.

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§select_last_index: bool

Whether ties select the last (rather than first) matching index.

§

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).

Fields

§axis: i64

The axis to operate along.

§p: i64

The p in the p-norm.

§

MeanVarianceNormalization

Mean/variance normalization along axes (ONNX MeanVarianceNormalization).

Fields

§axes: Vec<i64>

The axes to operate along.

§

LogSoftmax

Log-softmax along an axis (ONNX LogSoftmax).

Fields

§axis: i64

The axis to operate along.

§

Hardmax

One-hot of the argmax along an axis (ONNX Hardmax).

Fields

§axis: i64

The axis to operate along.

§

PRelu

Parametric ReLU, with a learned per-channel slope (ONNX PRelu).

§

ThresholdedRelu

ReLU that zeroes values at or below alpha (ONNX ThresholdedRelu).

Fields

§alpha: f64

The alpha parameter.

§

Shrink

Shrinks values toward zero by lambd, with a bias offset (ONNX Shrink).

Fields

§lambd: f64

The shrinkage threshold.

§bias: f64

A bias/offset value.

§

Clip

Clamps values to a [min, max] range (ONNX Clip).

§

Swish

Swish/SiLU activation (ONNX Swish).

§

MultiHeadAttention

Multi-head attention (ONNX MultiHeadAttention).

Fields

§q_num_heads: usize

Number of query attention heads.

§kv_num_heads: usize

Number of key/value attention heads.

§

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).

Fields

§scale: f64

Attention score scale factor, if explicitly specified.

§

LinearAttention

Linear-complexity attention (e.g. gated delta rule variants), optionally carrying state between calls (ONNX LinearAttention).

Fields

§q_num_heads: usize

Number of query attention heads.

§kv_num_heads: usize

Number of key/value attention heads.

§update_rule: String

Name of the state-update rule (e.g. a gated-delta variant).

§scale: f64

Attention score scale factor, if explicitly specified.

§

LRN

Local response normalization (ONNX LRN).

Fields

§alpha: f64

The alpha parameter.

§beta: f64

The beta parameter.

§bias: f64

A bias/offset value.

§size: usize

Window/kernel size.

§

Lstm

Long short-term memory recurrent layer (ONNX LSTM).

Fields

§hidden_size: usize

Size of the hidden state.

§direction: String

Direction of iteration/shift (e.g. "forward", "reverse", "bidirectional").

§bidirectional: bool

Whether to run the recurrence in both directions.

§

Gru

Gated recurrent unit layer (ONNX GRU).

Fields

§hidden_size: usize

Size of the hidden state.

§direction: String

Direction of iteration/shift (e.g. "forward", "reverse", "bidirectional").

§bidirectional: bool

Whether to run the recurrence in both directions.

§

Rnn

Simple recurrent layer (ONNX RNN).

Fields

§hidden_size: usize

Size of the hidden state.

§direction: String

Direction of iteration/shift (e.g. "forward", "reverse", "bidirectional").

§bidirectional: bool

Whether to run the recurrence in both directions.

§

Resize

Resizes a tensor (interpolation) (ONNX Resize).

Fields

§mode: String

The mode string selecting op-specific behavior.

§coordinate_transformation_mode: String

How resized coordinates map back to the input (ONNX Resize mode string).

§antialias: bool

Whether to apply an anti-aliasing filter when downsampling.

§

GridSample

Samples a tensor at grid-specified locations (ONNX GridSample).

Fields

§mode: String

The mode string selecting op-specific behavior.

§padding_mode: String

How out-of-bounds sample coordinates are handled.

§align_corners: bool

Whether corner pixels are aligned (vs. edge-aligned) when sampling/resizing.

§

SpaceToDepth

Rearranges spatial blocks into depth/channels (ONNX SpaceToDepth).

Fields

§blocksize: usize

Block size for the space/depth rearrangement.

§

DepthToSpace

Rearranges depth/channels into spatial blocks (ONNX DepthToSpace).

Fields

§blocksize: usize

Block size for the space/depth rearrangement.

§mode: String

The mode string selecting op-specific behavior.

§

RoiAlign

Region-of-interest pooling with bilinear alignment (ONNX RoiAlign).

Fields

§output_h: usize

Output region height.

§output_w: usize

Output region width.

§sampling_ratio: i64

Number of sampling points per output bin (0 = adaptive).

§spatial_scale: f64

Scale factor mapping ROI coordinates to the input feature map.

§

AffineGrid

Generates a 2-D/3-D sampling grid from an affine matrix (ONNX AffineGrid).

Fields

§align_corners: bool

Whether corner pixels are aligned (vs. edge-aligned) when sampling/resizing.

§

MaxUnpool

Inverse of max pooling, using stored indices (ONNX MaxUnpool).

Fields

§kernel_h: usize

Convolution/pooling kernel height.

§kernel_w: usize

Convolution/pooling kernel width.

§stride_h: usize

Vertical stride.

§stride_w: usize

Horizontal stride.

§

CenterCropPad

Crops or pads a tensor to a target shape, centered (ONNX CenterCropPad).

Fields

§axes: Vec<i64>

The axes to operate along.

§

NonMaxSuppression

Filters overlapping boxes by score (ONNX NonMaxSuppression).

Fields

§center_point_box: bool

Whether boxes are given as (center_x, center_y, width, height) instead of corners.

§

TopK

Returns the top-K values/indices along an axis (ONNX TopK).

Fields

§axis: i64

The axis to operate along.

§largest: bool

Whether to return the largest (vs. smallest) K values.

§sorted: bool

Whether outputs are sorted.

§

Unique

Returns unique elements (ONNX Unique).

Fields

§sorted: bool

Whether outputs are sorted.

§

Dropout

Dropout regularization (ONNX Dropout).

Fields

§training_mode: bool

Whether dropout is active (vs. a no-op at inference).

§

EyeLike

Creates an identity-like 2-D tensor (ONNX EyeLike).

Fields

§dtype: Option<DtypeRepr>

The dtype to use.

§k: i64

Diagonal offset.

§

OneHot

One-hot encodes indices along an axis (ONNX OneHot).

Fields

§axis: i64

The axis to operate along.

§

Bernoulli

Samples from a Bernoulli distribution using input probabilities (ONNX Bernoulli).

Fields

§dtype: Option<DtypeRepr>

The dtype to use.

§

RandomUniformLike

Samples uniform random values with another tensor’s shape (ONNX RandomUniformLike).

Fields

§dtype: Option<DtypeRepr>

The dtype to use.

§high: f64

Upper bound of the sampling range.

§low: f64

Lower bound of the sampling range.

§

RotaryEmbedding

Rotary position embedding (ONNX RotaryEmbedding).

§

QuantizeLinear

Linear quantization to a lower-precision dtype (ONNX QuantizeLinear).

Fields

§axis: i64

The axis to operate along.

§saturate: bool

Whether to saturate (clamp) out-of-range values instead of wrapping.

§

DequantizeLinear

Linear dequantization back to a floating-point dtype (ONNX DequantizeLinear).

Fields

§axis: i64

The axis to operate along.

§

DynamicQuantizeLinear

Dynamically computes quantization parameters and quantizes (ONNX DynamicQuantizeLinear).

§

Dft

Discrete Fourier transform (ONNX DFT).

Fields

§inverse: bool

Whether to compute the inverse transform.

§onesided: bool

Whether to return only the non-redundant half of the spectrum.

§

Stft

Short-time Fourier transform (ONNX STFT).

§

MelWeightMatrix

Generates a mel-scale filterbank matrix (ONNX MelWeightMatrix).

§

HannWindow

Generates a Hann window (ONNX HannWindow).

Fields

§periodic: bool

Whether the window is periodic (vs. symmetric).

§

BlackmanWindow

Generates a Blackman window (ONNX BlackmanWindow).

Fields

§periodic: bool

Whether the window is periodic (vs. symmetric).

§

HammingWindow

Generates a Hamming window (ONNX HammingWindow).

Fields

§periodic: bool

Whether the window is periodic (vs. symmetric).

§

NegativeLogLikelihoodLoss

Negative log-likelihood loss (ONNX NegativeLogLikelihoodLoss).

Fields

§reduction: String

The reduction mode applied to the per-element loss (e.g. "mean", "sum", "none").

§

SoftmaxCrossEntropyLoss

Softmax + cross-entropy loss (ONNX SoftmaxCrossEntropyLoss).

Fields

§reduction: String

The reduction mode applied to the per-element loss (e.g. "mean", "sum", "none").

§

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

§axis: i64

The axis to operate along.

§keepdims: bool

Whether to retain reduced dimensions with length 1.

§

ConcatFromSequence

Concatenates a sequence’s elements into one tensor (ONNX ConcatFromSequence).

Fields

§axis: i64

The axis to operate along.

§new_axis: bool

Whether to insert a new axis for the concatenation dimension.

§

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).

Fields

§num_scan_inputs: i64

Number of inputs treated as scanned sequences.

§

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).

Fields

§pattern: String

The regular expression pattern.

§

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).

Fields

§threshold: f64

The threshold value.

§

TreeEnsemble

Decision-tree ensemble inference (ONNX-ML TreeEnsemble).

§

ImageDecoder

Decodes an encoded image (e.g. PNG/JPEG) into a tensor (ONNX ImageDecoder).

Trait Implementations§

Source§

impl Clone for Op

Source§

fn clone(&self) -> Op

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Op

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Op

§

impl !RefUnwindSafe for Op

§

impl Send for Op

§

impl Sync for Op

§

impl Unpin for Op

§

impl UnsafeUnpin for Op

§

impl !UnwindSafe for Op

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.