Introduction

In this tutorial, we will cover TensorFlow in enough depth so that you can train machine learning models from scratch!

TensorFlow is Google’s flagship library for machine learning development. It is used both commercially and by developers for building and deploying machine learning modules. There are two broad versions of TensorFlow — 2.X and 1.X. Both allow for similar functionality, but 2.X uses a cleaner API and has some slight upgrades. It is important to understand that TensorFlow has grown from just a software library to an entire ecosystem for all types of machine learning. APIs like Keras make it extremely simple to train and test deep learning networks in a few lines. (We will cover this towards the end of this tutorial). This tutorial assumes a basic understanding of Python 3 and some degree of familiarity with linear algebra.

Mathematical Background

Let’s get started with some fundamental background on the mathematics behind TensorFlow. There are three main constructs for TensorFlow operations: vectors, arrays (matrices), tensors. A vector is a mathematical object that has a direction and a magnitude. It is used to find the position of one point in space relative to another point. An array is an arrangement or a series of elements such as symbols, numbers, or expressions. Arrays can be n-dimensional, so a matrix is an array with 2 dimensions. A tensor is an object describing the linear relationship among scalars, vectors, and other tensors. In other words, it is the stacking of multiple arrays to create higher dimensional structures. A practical example of a tensor in action is with an image. When an RGB image is processed, it is a 3-D tensor with layers for each color across the dimensions of height and width. Hopefully, this graphic should clarify the differences:

It would also be useful to understand the Rank of a Matrix. The rank of a Matrix is the number of linearly independent column or row vectors. Before moving on, we will assume that you understand basic linear algebra — transposes, inverses, matrix multiplication, etc. Let’s now define these concepts with some code.

#deep-learning #artificial-neural-network #tensorflow #machine-learning #keras #deep learning

The Ultimate Beginner’s Guide to TensorFlow
1.15 GEEK