ABSTRACT

TensorFlow is a Python library for heavy numerical computation in artificial intelligence (AI) written in Python, C++ and CUDA (C++ is a faster programming language than Python). The numpy library preprocesses data before it is fed into TensorFlow, making it extremely efficient. TensorFlow uses tensors in the computations; you can think of these as arrays of arrays, as described in Section 2.1 of this book. TensorFlow was first released in 2015 by Google, and the latest version 2 was released in 2019. It is predominantly used in machine and deep learning within AI and is completely free to the user. The easiest way to use TensorFlow is through Google Colab, and users have access to Central Processing Units (CPUs), Graphical Processing Units (GPUs) and even Tensor Processing Units (TPUs), via Google Colab and cloud computing. It is also possible to install TensorFlow to use in Spyder; readers will be able to find the latest instructions on the web. Keras is an Application Programming Interface (API) adopted by TensorFlow. It provides a user-friendly interface where activation functions, cost functions, metrics, neural network layers, normalization schemes and optimizers, for example, can all be incorporated in just a few lines of code.