TensorFlow Type
There are three main properties that definr the tensor they are:
– A unique label (name)
– A dimension (shape)
– A data type (dtype)
Each operation you will do with TensorFlow involves the manipulation of a tensor. There are four main tensors you can create:
– tf.Variable
– tf.constant
– tf.placeholder
– tf.SparseTensor
creation of these tensors is explained in depth in the upcoming tutorials and following are the datatypes used in them.
Data type | Python type | Description |
DT_FLOAT | tf.float32 | 32 bits floating point. |
DT_DOUBLE | tf.float64 | 64 bits floating point. |
DT_INT8 | tf.int8 | 8 bits signed integer. |
DT_INT16 | tf.int16 | 16 bits signed integer. |
DT_INT32 | tf.int32 | 32 bits signed integer. |
DT_INT64 | tf.int64 | 64 bits signed integer. |
DT_UINT8 | tf.uint8 | 8 bits unsigned integer. |
DT_STRING | tf.string | Variable length byte arrays. Each element of a Tensor is a byte array. |
DT_BOOL | tf.bool | Boolean. |
DT_COMPLEX64 | tf.complex64 | Complex number made of two 32 bits floating points: real and imaginary parts. |
DT_QINT8 | tf.qint8 | 8 bits signed integer used in quantized Ops. |
DT_QINT32 | tf.qint32 | 32 bits signed integer used in quantized Ops. |
DT_QUINT8 | tf.quint8 | 8 bits unsigned integer used in quantized Ops. |