February 2018
Intermediate to advanced
218 pages
5h 31m
English
In TensorFlow, data isn't stored as integers, floats, strings, or other primitives. These values are encapsulated in an object called a tensor. It consists of a set of primitive values shaped into an array of any number of dimensions. The number of dimensions in a tensor is called its rank. In the preceding example, hello_constant is a constant string tensor with rank zero. A few more examples of constant tensors are as follows:
# A is an int32 tensor with rank = 0A = tf.constant(123) # B is an int32 tensor with dimension of 1 ( rank = 1 ) B = tf.constant([123,456,789]) # C is an int32 2- dimensional tensor C = tf.constant([ [123,456,789], [222,333,444] ])
TensorFlow's core program is based on the idea of a computational ...
Read now
Unlock full access