Enum Class ONNXOperators
- All Implemented Interfaces:
Serializable,Comparable<ONNXOperators>,Constable,ONNXOperator
ONNX Opset 13, and ONNX-ML version 1.
In a future version of Tribuo this class will be split into two enums, one for ONNX opset 13 and one for ONNX-ML v1.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionElement-wise addition with broadcasting.Array feature extractor, selects the indices specified by the second tensor from the last dimension of the first tensor.Cast input to specified type.Concatenates tensors.Makes a constant of the size of the supplied shape containing thevalue.Element-wise division with broadcasting.Gathers elements from the first argument (of rank r) indexed by the second argument (of rank q) producing a tensor of rankq + r - 1.General Matrix Multiply:alpha*AB + beta*C.Greater than, returns the element-wise greater than operation on the two tensors.Greater than or equal to, returns the element-wise greater than or equal to operation on the two tensors.Hardmax(element in input, axis) = 1 if the element is the first maximum value along the specified axis, 0 otherwise.Identity.Less than, returns the element-wise less than operation on the two tensors.Less than or equal to, returns the element-wise less than or equal to operation on the two tensors.Element-wise multiplication with broadcasting.Element-wise negation.Element-wise exponentiation with broadcasting.Computes the mean of the input tensor's element along the provided axes.Compute the minimum along the specified axes of the tensor.Compute the sum along the specified axes of the tensor, the axes are the second input.Sigmoid element-wise.Softmax.Element-wise subtraction with broadcasting.Element-wise summation across the supplied inputs with broadcasting.SVM Classifier.SVM Regressor.Adds extra dimensions to a tensor in the specified places, the axes are the second input.Choice operator, based on the true value of the condition input, returns the element at that index from either the second or third input. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Map<String, ONNXAttribute> The operator attributes.final StringThe operator domain (used for the ML operators).The mandatory attribute names.final intThe number of inputs.final intThe number of optional inputs.final intThe number of outputs.final StringThe operator name. -
Method Summary
Modifier and TypeMethodDescriptionThe operator attributes.The mandatory attribute names.intThe number of inputs.intThe number of optional inputs.intThe number of outputs.Returns the opset domain.The operator name.static ai.onnx.proto.OnnxMl.OperatorSetIdProtoReturns the opset proto for these operators.static intReturns the opset version supported by these operators.intReturns the opset version.static ONNXOperatorsReturns the enum constant of this class with the specified name.static ONNXOperators[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface org.tribuo.util.onnx.ONNXOperator
build, build, build, build, build, build, build, build, opsetProto
-
Enum Constant Details
-
IDENTITY
Identity. -
CONCAT
Concatenates tensors. -
CONSTANT_OF_SHAPE
Makes a constant of the size of the supplied shape containing thevalue. -
SIGMOID
Sigmoid element-wise. -
SOFTMAX
Softmax.axisdefaults to -1.
-
CAST
Cast input to specified type.tomust be a data type int fromOnnxMl.TensorProto.DataType
-
NEG
Element-wise negation. -
ADD
Element-wise addition with broadcasting. -
SUB
Element-wise subtraction with broadcasting. -
MUL
Element-wise multiplication with broadcasting. -
DIV
Element-wise division with broadcasting. -
POW
Element-wise exponentiation with broadcasting. -
SUM
Element-wise summation across the supplied inputs with broadcasting. -
GATHER
Gathers elements from the first argument (of rank r) indexed by the second argument (of rank q) producing a tensor of rankq + r - 1.axisthe axis of the first argument to gather from.
-
HARDMAX
Hardmax(element in input, axis) = 1 if the element is the first maximum value along the specified axis, 0 otherwise.axisdefault is -1, i.e., take the hardmax over the last dimension.
-
REDUCE_MEAN
Computes the mean of the input tensor's element along the provided axes.axesdefault is to reduce over all dimensions.keepdimsdefaults to 1 which means keep.
-
REDUCE_MIN
Compute the minimum along the specified axes of the tensor.axesdefaults to all dimensions.keepdimsdefaults to 1 which means keep.
-
REDUCE_SUM
Compute the sum along the specified axes of the tensor, the axes are the second input.keepdimsdefaults to 1 which means keep.noop_with_empty_axesdefaults to 0 which means empty axes reduces the tensor to a scalar.
-
UNSQUEEZE
Adds extra dimensions to a tensor in the specified places, the axes are the second input. -
GEMM
General Matrix Multiply:alpha*AB + beta*C.The
Cinput is optional, and if not supplied is treated as zero.alphadefaults to 1.0betadefaults to 1.0transAdefaults to 0 (i.e., not transposed)transBdefaults to 0 (i.e., not transposed)
-
GREATER
Greater than, returns the element-wise greater than operation on the two tensors.Tensors must be broadcastable to the same shape.
-
GREATER_OR_EQUAL
Greater than or equal to, returns the element-wise greater than or equal to operation on the two tensors.Tensors must be broadcastable to the same shape.
-
LESS
Less than, returns the element-wise less than operation on the two tensors.Tensors must be broadcastable to the same shape.
-
LESS_OR_EQUAL
Less than or equal to, returns the element-wise less than or equal to operation on the two tensors.Tensors must be broadcastable to the same shape.
-
WHERE
Choice operator, based on the true value of the condition input, returns the element at that index from either the second or third input. When the test is true, return the second input, otherwise return the third input. -
ARRAY_FEATURE_EXTRACTOR
Array feature extractor, selects the indices specified by the second tensor from the last dimension of the first tensor. -
SVM_CLASSIFIER
SVM Classifier.classlabels_ints- Class labels if using integer labels. One and only one of the 'classlabels_*' attributes must be defined.classlabels_strings- Class labels if using string labels. One and only one of the 'classlabels_*' attributes must be defined.coefficients- SVM coefficientskernel_params- Tuple of gamma, coef0 and degree. Set to zero if unused by the kernel.kernel_type- One of 'LINEAR,' 'POLY,' 'RBF,' 'SIGMOID'.post_transforms- Transform to apply to the score (usually unused by SVMs), one of 'NONE,' 'SOFTMAX,' 'LOGISTIC,' 'SOFTMAX_ZERO,' or 'PROBIT'.prob_a- Probability coefficients, if set must be the same size as prob_b.prob_b- Probability coefficients, if set must be the same size as prob_a.rho- Rho vector.support_vectors- linearised support vectors.vectors_per_class- the number of support vectors in each class.
-
SVM_REGRESSOR
SVM Regressor.coefficients- SVM coefficientskernel_params- Tuple of gamma, coef0 and degree. Set to zero if unused by the kernel.kernel_type- One of 'LINEAR,' 'POLY,' 'RBF,' 'SIGMOID'.n_supports- The number of support vectors.one_class- Flag noting if this regression is a one-class SVM for anomaly detection or not.post_transforms- Transform to apply to the score (usually unused by SVMs), one of 'NONE,' 'SOFTMAX,' 'LOGISTIC,' 'SOFTMAX_ZERO,' or 'PROBIT'.rho- Rho vector.support_vectors- linearised support vectors.
-
-
Field Details
-
opName
The operator name. -
numInputs
public final int numInputsThe number of inputs. -
numOptionalInputs
public final int numOptionalInputsThe number of optional inputs. -
numOutputs
public final int numOutputsThe number of outputs. -
attributes
The operator attributes. -
mandatoryAttributeNames
-
domain
The operator domain (used for the ML operators).Null if the domain is the default one.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getOpName
Description copied from interface:ONNXOperatorThe operator name.- Specified by:
getOpNamein interfaceONNXOperator- Returns:
- The name.
-
getNumInputs
public int getNumInputs()Description copied from interface:ONNXOperatorThe number of inputs.- Specified by:
getNumInputsin interfaceONNXOperator- Returns:
- The number of inputs.
-
getNumOptionalInputs
public int getNumOptionalInputs()Description copied from interface:ONNXOperatorThe number of optional inputs.- Specified by:
getNumOptionalInputsin interfaceONNXOperator- Returns:
- The number of optional inputs.
-
getNumOutputs
public int getNumOutputs()Description copied from interface:ONNXOperatorThe number of outputs.- Specified by:
getNumOutputsin interfaceONNXOperator- Returns:
- The number of outputs.
-
getAttributes
Description copied from interface:ONNXOperatorThe operator attributes.- Specified by:
getAttributesin interfaceONNXOperator- Returns:
- The operator attribute map.
-
getMandatoryAttributeNames
Description copied from interface:ONNXOperatorThe mandatory attribute names.- Specified by:
getMandatoryAttributeNamesin interfaceONNXOperator- Returns:
- The required attribute names.
-
getOpVersion
public int getOpVersion()Description copied from interface:ONNXOperatorReturns the opset version.- Specified by:
getOpVersionin interfaceONNXOperator- Returns:
- The opset version.
-
getOpDomain
Description copied from interface:ONNXOperatorReturns the opset domain.May be
nullif it is the default ONNX domain;- Specified by:
getOpDomainin interfaceONNXOperator- Returns:
- The opset domain.
-
getOpsetVersion
public static int getOpsetVersion()Returns the opset version supported by these operators.- Returns:
- The opset version.
-
getOpsetProto
public static ai.onnx.proto.OnnxMl.OperatorSetIdProto getOpsetProto()Returns the opset proto for these operators.- Returns:
- The opset proto.
-