TensorFlow

An open-source library for numerical computation using data flow graphs. Nodes are operations, edges are tensors that flow between nodes. Graphs are deployed in a session, bound to an execution context (GPU/CPU/TPU).

1. Design Principles

To support control flow (needed for RNNs, LTSMs, etc), TensorFlow adds conditional and iterative programming constructs.

2. Architecture

Core written in C++, different frontends for driving compute. When multiple GPUs are available, TensorFlow automatically splits the graph into subgraphs and places them on different devices. It also supports distributed training across multiple nodes. This works by using a parameter server architecture, where each worker node computes gradients and sends them to the parameter server, which updates the model parameters and sends them back to the workers.

It also uses a client to define the graph, a master optimises and splits the graph amongst workers. It adds communication operators Send and Recv to the graph for distributed training.

Fault tolerance is achieved by checkpointing the model parameters to disk, so that training can resume from the last checkpoint in case of failure.

Back to Home