Enum Class ScalarType

java.lang.Object
java.lang.Enum<ScalarType>
smile.deep.tensor.ScalarType
All Implemented Interfaces:
Serializable, Comparable<ScalarType>, Constable

public enum ScalarType extends Enum<ScalarType>
The data type of the elements stored in the tensor.
  • Enum Constant Details

    • QUInt8

      public static final ScalarType QUInt8
      8-bit quantized unsigned tensor type which represents a compressed floating point tensor.
    • QInt8

      public static final ScalarType QInt8
      8-bit quantized signed tensor type which represents a compressed floating point tensor.
    • Int8

      public static final ScalarType Int8
      8-bit integer.
    • Int16

      public static final ScalarType Int16
      16-bit integer.
    • Int32

      public static final ScalarType Int32
      32-bit integer.
    • Int64

      public static final ScalarType Int64
      64-bit integer.
    • BFloat16

      public static final ScalarType BFloat16
      The bfloat16 (brain floating point) floating-point format occupies 16 bits. This format is a shortened version of the 32-bit IEEE 754 single-precision floating-point format. It preserves the approximate dynamic range of 32-bit floating-point numbers by retaining 8 exponent bits, but supports only an 8-bit precision rather than the 24-bit significand of the single precision.
    • Float16

      public static final ScalarType Float16
      Half-precision floating-point number. It contains 5 exponent bits and 11 11-bit precision (10 explicitly stored).
    • Float32

      public static final ScalarType Float32
      Single-precision floating-point number.
    • Float64

      public static final ScalarType Float64
      Double-precision floating-point number.
  • Method Details

    • values

      public static ScalarType[] 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 ScalarType 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