Skip navigation links

Package org.tensorflow.types

Defines classes that represent TensorFlow data types.

See: Description

Package org.tensorflow.types Description

Defines classes that represent TensorFlow data types. For each possible data type that can be used in a tensor, there is a corresponding class that is used to represent it. For example, the TensorFlow int32 type is represented by the type Integer and by the class object Integer.class. The former is used to support compile-time checking of tensor element types and the latter is used for run-time checking of element types. Classes appearing in this package, such as UInt8, represent TensorFlow data types for which there is no existing Java equivalent.

TensorFlow element types are also separately represented by the DataType enum, with one enum value per element type. The enum representation is not usually needed, but can be obtained using DataType.fromClass(java.lang.Class<?>).

Skip navigation links

Copyright © 2022. All rights reserved.