Deep Learning Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

How do NN capture interactions?

A

By using hidden layers in which nodes are the result of the dot products of n-1 layer nodes.

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

What is forward propagation?

A

Multiply input node values by weights specified in edge between those nodes and next layer’s node and ADD..

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

How to compute final NN output value using np?

A

output = (hidden_layer_values * weights[‘output’]).sum()

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

What is an activation function?

A

A function applied to node inputs to produce node output.

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

What is RELU?

A

Rectified Linear Activation. 0 if x < 0 else x.

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

Why is there less of a need for feature engineering with DL?

A

Deep networks internally build representations of patterns in the data. Subsequent layers build increasingly sophisticated representations of raw data.

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

What are the steps of Gradient Descent?

A

Start at random point
Until you are somewhere flat:
● Find the slope
● Take a step downhill

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

How to avoid big steps with GD?

A

Using a learning rate: Update each weight by subtracting

learning rate * slope

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

How to calculate new weight for a current weight of 2 connecting Node with value of 3 to Node with predicted Valued 6 and actual Value of 10 and learning rate 0.01?

A

Multiply the gradient with the learning rate:
* Slope of the loss function (Error) w.r.t value at the node we feed into: 2* (Predicted Value [6] - Actual Value [10]): -8
* The value of the node that feeds into our weight: 3
* Slope of activation function at the node it feeds into. None here.
* Learning rate: 0.01
Result: 2 - 0.01(-24) = 2.24

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

What is backpropagation?

A

It allows gradient descent to update all weights in neural network (by getting gradients for all weights). It first tries to estimate the slope of the loss function w.r.t each weight and then uses forward propagation to calculate predictions and errors.

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

What is stochastic gradient descent?

A

When slopes are calculated on one batch at a time.

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

What is an epoch?

A

When all batches have been used to update the weights.

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

What is the Adam optimizer?

A

An algorithm for first-order gradient-based optimization of stochastic objective functions.

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

How to load csv data with np?

A

predictors = np.loadtxt(‘predictors_data.csv’, delimiter=’,’)

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

How to ease optimization?

A

Scaling data before fitting can ease optimization.

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

What is a good objective function for regression?

A

Mean squared error

17
Q

What is a good objective function for classification?

A

categorical cross entropy

18
Q

What is softmax?

A

A generalization of the logistic function that “squashes” a K-dimensional vector z of arbitrary real values to a K-dimensional vector s(z) of real values in the range [0, 1] that add up to 1.

19
Q

What is the first argument to keras.layers.Dense?

A

The number of units, representing the dimensionality of the output space.

20
Q

How to do one-hot encoding with keras for classification?

A

keras.utils.to_categorical(list)

21
Q

Why is k-fold validation not used frequently for DL?

A

Too long too repeat; data sets are large anyway so trust single validation.

22
Q

What is early stopping?

A

How many epochs we are willing to see without improvements.