Package ai.onnxruntime
Enum Class OrtSession.SessionOptions.OptLevel
java.lang.Object
java.lang.Enum<OrtSession.SessionOptions.OptLevel>
ai.onnxruntime.OrtSession.SessionOptions.OptLevel
- All Implemented Interfaces:
Serializable,Comparable<OrtSession.SessionOptions.OptLevel>,Constable
- Enclosing class:
- OrtSession.SessionOptions
public static enum OrtSession.SessionOptions.OptLevel
extends Enum<OrtSession.SessionOptions.OptLevel>
The optimisation level to use. Needs to be kept in sync with the GraphOptimizationLevel enum
in the C API.
See Graph Optimizations for more details.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionApplies all available optimizations to the ONNX graph.Apply basic optimizations such as constant folding, redundant computation elimination and node fusions to the ONNX graph.Applies all the basic optimizations plus more complex node fusion operations to the ONNX graph.Apply no optimizations to the ONNX graph. -
Method Summary
Modifier and TypeMethodDescriptionintgetID()Gets the int id used in native code for this optimisation level.Returns the enum constant of this class with the specified name.static OrtSession.SessionOptions.OptLevel[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_OPT
Apply no optimizations to the ONNX graph. -
BASIC_OPT
Apply basic optimizations such as constant folding, redundant computation elimination and node fusions to the ONNX graph. -
EXTENDED_OPT
Applies all the basic optimizations plus more complex node fusion operations to the ONNX graph. -
ALL_OPT
Applies all available optimizations to the ONNX graph.
-
-
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
-
getID
public int getID()Gets the int id used in native code for this optimisation level.- Returns:
- The int id.
-