Chapter 2. Before we begin: the mathematical building blocks of neural networks Flashcards
What is a class ?
It’s a category in a classification problem
What is a sample ?
samples are data points
What is a label ?
The class associated with a specific sample
What is a loss function ?
How the network will be able to measure its performance on the training data, and thus how it will be able to steer itself in the right direction.
What is an optimizer ?
The mechanism through which the network will update itself based on the data it sees and its loss function.
What are the metrics to monitor during the training and testing process ?
Here, we’ll only care about accuracy (the fraction of the images that were correctly classified).
What is a tensor ?
Data stored in multidimensional Numpy arrays.
At its core, a tensor is a container for data—almost always numerical data. So, it’s a container for numbers. You may be already familiar with matrices, which are 2D tensors: tensors are a generalization of matrices to an arbitrary number of dimensions (note that in the context of tensors, a dimension is often called an axis).
What is a scalar ?
A tensor that contains only one number
How many number of axis a scalar tensor has ?
0
Which attribute do you use to display number of axis of a tensor ?
.ndim
What is called an array of numbers ?
An array of numbers is called a vector, or 1D tensor. A 1D tensor is said to have exactly one axis.
What is a tensor rank ?
the number of axes
What is a matrix ?
An array of vectors or 2D tensors
A tensor is defined by which three attributes ?
- Number of Axes
- Shape
- Data Type
What is a tensor shape ?
It is a tuple of integers that describes how many dimensions the tensor has along each axis. For instance, the previous matrix example has shape (3, 5), and the 3D tensor example has shape (3, 3, 5). A vector has a shape with a single element, such as (5,), whereas a scalar has an empty shape, ().