Package onnx

Enum Class Onnx.TensorProto.DataType

All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<Onnx.TensorProto.DataType>, Constable
Enclosing class:
Onnx.TensorProto

public static enum Onnx.TensorProto.DataType extends Enum<Onnx.TensorProto.DataType> implements com.google.protobuf.ProtocolMessageEnum
Protobuf enum onnx.TensorProto.DataType
  • Enum Constant Details

    • UNDEFINED

      public static final Onnx.TensorProto.DataType UNDEFINED
      UNDEFINED = 0;
    • FLOAT

      public static final Onnx.TensorProto.DataType FLOAT
       Basic types.
       
      FLOAT = 1;
    • UINT8

      public static final Onnx.TensorProto.DataType UINT8
       uint8_t
       
      UINT8 = 2;
    • INT8

      public static final Onnx.TensorProto.DataType INT8
       int8_t
       
      INT8 = 3;
    • UINT16

      public static final Onnx.TensorProto.DataType UINT16
       uint16_t
       
      UINT16 = 4;
    • INT16

      public static final Onnx.TensorProto.DataType INT16
       int16_t
       
      INT16 = 5;
    • INT32

      public static final Onnx.TensorProto.DataType INT32
       int32_t
       
      INT32 = 6;
    • INT64

      public static final Onnx.TensorProto.DataType INT64
       int64_t
       
      INT64 = 7;
    • STRING

      public static final Onnx.TensorProto.DataType STRING
       string
       
      STRING = 8;
    • BOOL

      public static final Onnx.TensorProto.DataType BOOL
       bool
       
      BOOL = 9;
    • FLOAT16

      public static final Onnx.TensorProto.DataType FLOAT16
       IEEE754 half-precision floating-point format (16 bits wide).
       This format has 1 sign bit, 5 exponent bits, and 10 mantissa bits.
       
      FLOAT16 = 10;
    • DOUBLE

      public static final Onnx.TensorProto.DataType DOUBLE
      DOUBLE = 11;
    • UINT32

      public static final Onnx.TensorProto.DataType UINT32
      UINT32 = 12;
    • UINT64

      public static final Onnx.TensorProto.DataType UINT64
      UINT64 = 13;
    • COMPLEX64

      public static final Onnx.TensorProto.DataType COMPLEX64
       complex with float32 real and imaginary components
       
      COMPLEX64 = 14;
    • COMPLEX128

      public static final Onnx.TensorProto.DataType COMPLEX128
       complex with float64 real and imaginary components
       
      COMPLEX128 = 15;
    • BFLOAT16

      public static final Onnx.TensorProto.DataType BFLOAT16
       Non-IEEE floating-point format based on IEEE754 single-precision
       floating-point number truncated to 16 bits.
       This format has 1 sign bit, 8 exponent bits, and 7 mantissa bits.
       
      BFLOAT16 = 16;
    • FLOAT8E4M3FN

      public static final Onnx.TensorProto.DataType FLOAT8E4M3FN
       Non-IEEE floating-point format based on papers
       FP8 Formats for Deep Learning, https://arxiv.org/abs/2209.05433,
       8-bit Numerical Formats For Deep Neural Networks, https://arxiv.org/pdf/2206.02915.pdf.
       Operators supported FP8 are Cast, CastLike, QuantizeLinear, DequantizeLinear.
       The computation usually happens inside a block quantize / dequantize
       fused by the runtime.
       
      FLOAT8E4M3FN = 17;
    • FLOAT8E4M3FNUZ

      public static final Onnx.TensorProto.DataType FLOAT8E4M3FNUZ
       float 8, mostly used for coefficients, supports nan, not inf, no negative zero 
       
      FLOAT8E4M3FNUZ = 18;
    • FLOAT8E5M2

      public static final Onnx.TensorProto.DataType FLOAT8E5M2
       follows IEEE 754, supports nan, inf, mostly used for gradients
       
      FLOAT8E5M2 = 19;
    • FLOAT8E5M2FNUZ

      public static final Onnx.TensorProto.DataType FLOAT8E5M2FNUZ
       follows IEEE 754, supports nan, inf, mostly used for gradients, no negative zero
       
      FLOAT8E5M2FNUZ = 20;
  • Field Details

    • UNDEFINED_VALUE

      public static final int UNDEFINED_VALUE
      UNDEFINED = 0;
      See Also:
    • FLOAT_VALUE

      public static final int FLOAT_VALUE
       Basic types.
       
      FLOAT = 1;
      See Also:
    • UINT8_VALUE

      public static final int UINT8_VALUE
       uint8_t
       
      UINT8 = 2;
      See Also:
    • INT8_VALUE

      public static final int INT8_VALUE
       int8_t
       
      INT8 = 3;
      See Also:
    • UINT16_VALUE

      public static final int UINT16_VALUE
       uint16_t
       
      UINT16 = 4;
      See Also:
    • INT16_VALUE

      public static final int INT16_VALUE
       int16_t
       
      INT16 = 5;
      See Also:
    • INT32_VALUE

      public static final int INT32_VALUE
       int32_t
       
      INT32 = 6;
      See Also:
    • INT64_VALUE

      public static final int INT64_VALUE
       int64_t
       
      INT64 = 7;
      See Also:
    • STRING_VALUE

      public static final int STRING_VALUE
       string
       
      STRING = 8;
      See Also:
    • BOOL_VALUE

      public static final int BOOL_VALUE
       bool
       
      BOOL = 9;
      See Also:
    • FLOAT16_VALUE

      public static final int FLOAT16_VALUE
       IEEE754 half-precision floating-point format (16 bits wide).
       This format has 1 sign bit, 5 exponent bits, and 10 mantissa bits.
       
      FLOAT16 = 10;
      See Also:
    • DOUBLE_VALUE

      public static final int DOUBLE_VALUE
      DOUBLE = 11;
      See Also:
    • UINT32_VALUE

      public static final int UINT32_VALUE
      UINT32 = 12;
      See Also:
    • UINT64_VALUE

      public static final int UINT64_VALUE
      UINT64 = 13;
      See Also:
    • COMPLEX64_VALUE

      public static final int COMPLEX64_VALUE
       complex with float32 real and imaginary components
       
      COMPLEX64 = 14;
      See Also:
    • COMPLEX128_VALUE

      public static final int COMPLEX128_VALUE
       complex with float64 real and imaginary components
       
      COMPLEX128 = 15;
      See Also:
    • BFLOAT16_VALUE

      public static final int BFLOAT16_VALUE
       Non-IEEE floating-point format based on IEEE754 single-precision
       floating-point number truncated to 16 bits.
       This format has 1 sign bit, 8 exponent bits, and 7 mantissa bits.
       
      BFLOAT16 = 16;
      See Also:
    • FLOAT8E4M3FN_VALUE

      public static final int FLOAT8E4M3FN_VALUE
       Non-IEEE floating-point format based on papers
       FP8 Formats for Deep Learning, https://arxiv.org/abs/2209.05433,
       8-bit Numerical Formats For Deep Neural Networks, https://arxiv.org/pdf/2206.02915.pdf.
       Operators supported FP8 are Cast, CastLike, QuantizeLinear, DequantizeLinear.
       The computation usually happens inside a block quantize / dequantize
       fused by the runtime.
       
      FLOAT8E4M3FN = 17;
      See Also:
    • FLOAT8E4M3FNUZ_VALUE

      public static final int FLOAT8E4M3FNUZ_VALUE
       float 8, mostly used for coefficients, supports nan, not inf, no negative zero 
       
      FLOAT8E4M3FNUZ = 18;
      See Also:
    • FLOAT8E5M2_VALUE

      public static final int FLOAT8E5M2_VALUE
       follows IEEE 754, supports nan, inf, mostly used for gradients
       
      FLOAT8E5M2 = 19;
      See Also:
    • FLOAT8E5M2FNUZ_VALUE

      public static final int FLOAT8E5M2FNUZ_VALUE
       follows IEEE 754, supports nan, inf, mostly used for gradients, no negative zero
       
      FLOAT8E5M2FNUZ = 20;
      See Also:
  • Method Details

    • values

      public static Onnx.TensorProto.DataType[] 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

      public static Onnx.TensorProto.DataType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static Onnx.TensorProto.DataType valueOf(int value)
      Deprecated.
      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:
      value - 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 name
      NullPointerException - if the argument is null
    • forNumber

      public static Onnx.TensorProto.DataType forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<Onnx.TensorProto.DataType> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static Onnx.TensorProto.DataType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
      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:
      desc - 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 name
      NullPointerException - if the argument is null