/    /  TensorFlow Type

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 typePython typeDescription
DT_FLOATtf.float3232 bits floating point.
DT_DOUBLEtf.float6464 bits floating point.
DT_INT8tf.int88 bits signed integer.
DT_INT16tf.int1616 bits signed integer.
DT_INT32tf.int3232 bits signed integer.
DT_INT64tf.int6464 bits signed integer.
DT_UINT8tf.uint88 bits unsigned integer.
DT_STRINGtf.stringVariable length byte arrays. Each element of a Tensor is a byte array.
DT_BOOLtf.boolBoolean.
DT_COMPLEX64tf.complex64Complex number made of two 32 bits floating points: real and imaginary parts.
DT_QINT8tf.qint88 bits signed integer used in quantized Ops.
DT_QINT32tf.qint3232 bits signed integer used in quantized Ops.
DT_QUINT8tf.quint88 bits unsigned integer used in quantized Ops.