Introducing popular DL libraries
We already implemented a simple example with PyTorch in Chapter 1. In this section, we’ll introduce this library, and Keras, more systemically. Let’s start with the common features of most DNN libraries:
- All libraries use Python.
- The basic unit for data storage is the tensor. Mathematically, the definition of a tensor is more complex, but in the context of DL libraries, they are multi-dimensional (with an arbitrary number of axes) arrays of base values.
- NNs are represented as a computational graph of operations. The nodes of the graph represent the operations (weighted sum, activation function, and so on). The edges represent the flow of data, which is how the output of one operation serves as an input for the next one. The inputs and outputs of the operations (including the network inputs and outputs) are tensors.
- All libraries include automatic differentiation. This means that all you need to do is define the network...