Chapter 2. Before we begin: the mathematical building blocks of neural networks Flashcards

1
Q

What is a class ?

A

It’s a category in a classification problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a sample ?

A

samples are data points

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a label ?

A

The class associated with a specific sample

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a loss function ?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is an optimizer ?

A

The mechanism through which the network will update itself based on the data it sees and its loss function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the metrics to monitor during the training and testing process ?

A

Here, we’ll only care about accuracy (the fraction of the images that were correctly classified).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a tensor ?

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a scalar ?

A

A tensor that contains only one number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How many number of axis a scalar tensor has ?

A

0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which attribute do you use to display number of axis of a tensor ?

A

.ndim

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is called an array of numbers ?

A

An array of numbers is called a vector, or 1D tensor. A 1D tensor is said to have exactly one axis.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a tensor rank ?

A

the number of axes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a matrix ?

A

An array of vectors or 2D tensors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A tensor is defined by which three attributes ?

A
  • Number of Axes
  • Shape
  • Data Type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a tensor shape ?

A

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, ().

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is tensor slicing ?

A

Selecting a specific item in a tensor

17
Q

What is a batch axis or batch dimension ?

A

It’s the first axis ( axis 0 )

18
Q

What to steps broadcasting consist of:

A
  1. Axes (called broadcast axes) are added to the smaller tensor to match the ndim of the larger tensor.
  2. The smaller tensor is repeated alongside these new axes to match the full shape of the larger tensor.
19
Q

What is tensor reshaping ?

A

Reshaping a tensor means rearranging its rows and columns to match a target shape

20
Q

What is Transposing a Matrix ?

A

It means exchanging its rows and its columns so that x[i, :] becomes x[:, i]:

21
Q

Summarise steps for a training loop:

A
  1. Draw a batch of training samples x and corresponding targets y.
  2. Run the network on x (a step called the forward pass) to obtain predictions y_pred.
  3. Compute the loss of the network on the batch, a measure of the mismatch between y_pred and y.
  4. Update all weights of the network in a way that slightly reduces the loss on this batch.
22
Q

What is a function’s minimum ?

A

it is a point where the derivate is 0
Applied to a neural network, that means finding analytically the combination of weight values that yields the smallest possible loss function

23
Q

What is stochastic ?

A

Stochastic is a scientific synonym of random

24
Q

Where the knowledge of the network persists ?

A

In the weights tensors

25
Q

What is an epoch ?

A

Each iteration over all the training data

26
Q

What does learning mean ?

A

Learning means finding a combination of model parameters that minimizes a loss function for a given set of training data samples and their corresponding targets.

27
Q

How the learning process happen ?

A

Learning happens by drawing random batches of data samples and their targets, and computing the gradient of the network parameters with respect to the loss on the batch. The network parameters are then moved a bit (the magnitude of the move is defined by the learning rate) in the opposite direction from the gradient.

28
Q

What is the loss ?

A

The loss is the quantity you’ll attempt to minimize during training, so it should represent a measure of success for the task you’re trying to solve.

29
Q

What is an optimizer ?

A

The optimizer specifies the exact way in which the gradient of the loss will be used to update parameters: for instance, it could be the RMSProp optimizer, SGD with momentum, and so on.