DataType

enum DataType

Represents the type of elements in a TensorFlow Lite Tensor as an enum.

Summary

Enum Values

BOOL

Bool.

FLOAT32

32-bit single precision floating point.

INT16

16-bit signed integer.

INT32

32-bit signed integer.

INT64

64-bit signed integer.

INT8

8-bit signed integer.

STRING

Strings.

UINT8

8-bit unsigned integer.

Public functions

Int

Returns the size of an element of this type, in bytes, or -1 if element size is variable.

java-static DataType!
valueOf(name: String!)

Returns the enum constant of this type with the specified name.

java-static Array<DataType!>!

Returns an array containing the constants of this enum type, in the order they're declared.

Enum Values

BOOL

val DataType.BOOLDataType

Bool.

FLOAT32

val DataType.FLOAT32DataType

32-bit single precision floating point.

INT16

val DataType.INT16DataType

16-bit signed integer.

INT32

val DataType.INT32DataType

32-bit signed integer.

INT64

val DataType.INT64DataType

64-bit signed integer.

INT8

val DataType.INT8DataType

8-bit signed integer.

STRING

val DataType.STRINGDataType

Strings.

UINT8

val DataType.UINT8DataType

8-bit unsigned integer.

Public functions

byteSize

fun byteSize(): Int

Returns the size of an element of this type, in bytes, or -1 if element size is variable.

valueOf

java-static fun valueOf(name: String!): DataType!

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Returns
DataType!

the enum constant with the specified name

Throws
java.lang.IllegalArgumentException

if this enum type has no constant with the specified name

values

java-static fun values(): Array<DataType!>!

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

Returns
Array<DataType!>!

an array containing the constants of this enum type, in the order they're declared