Chapter 2. Doing Math with TensorFlow

In this chapter, we will cover the following topics:

  • The tensor data structure
  • Handling tensors with TensorFlow
  • Complex numbers and fractals
  • Computing derivatives
  • Random numbers
  • Solving partial differential equations

The tensor data structure

Tensors are the basic data structures in TensorFlow. As we have already said, they represent the connecting edges in a Data Flow Graph. A tensor simply identifies a multidimensional array or list.

It can be identified by three parameters,  rank, shape, and type:

  • rank: Each tensor is described by a unit of dimensionality called rank. It identifies the number of dimensions of the tensor. For this reason, a rank is known as order or n-dimensions of a tensor (for example, a rank 2 ...

Get Getting Started with TensorFlow now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.