Package smile.deep.tensor
Enum Class ScalarType
- All Implemented Interfaces:
Serializable
,Comparable<ScalarType>
,Constable
The data type of the elements stored in the tensor.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe bfloat16 (brain floating point) floating-point format occupies 16 bits.Half-precision floating-point number.Single-precision floating-point number.Double-precision floating-point number.16-bit integer.32-bit integer.64-bit integer.8-bit integer.8-bit quantized signed tensor type which represents a compressed floating point tensor.8-bit quantized unsigned tensor type which represents a compressed floating point tensor. -
Method Summary
Modifier and TypeMethodDescriptionstatic ScalarType
Returns the enum constant of this class with the specified name.static ScalarType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
QUInt8
8-bit quantized unsigned tensor type which represents a compressed floating point tensor. -
QInt8
8-bit quantized signed tensor type which represents a compressed floating point tensor. -
Int8
8-bit integer. -
Int16
16-bit integer. -
Int32
32-bit integer. -
Int64
64-bit integer. -
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
Half-precision floating-point number. It contains 5 exponent bits and 11 11-bit precision (10 explicitly stored). -
Float32
Single-precision floating-point number. -
Float64
Double-precision floating-point number.
-
-
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
-