CHAP 10 : INTRO TO DEEP LEARNING Flashcards

1
Q

What is deep learning?

A

It is one of the many branches of machine learning where operations are applied one after another.

It is a mathematical framework to learn representations from data

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

Operations in deep learning are structured into models called _____, deep learning models are typically stacks of _____ (same word)

A

Layers

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

What is the goal of the process of learning for deep learning?

A

To find good values for weights in the layers (i.e. values that minimise a loss function)

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

What are the 2 limitations of machine learning, as compared to deep learning?

A
  1. ML requires a lot of storage in CPU (CENTRAL processing Unit –> found in computer), resulting in longer computations

ML cannot extract features for complex problems like object recognition

e.g. face detection
> ML : We need to define/specify features like eyes, ears etc and ML program will identify which features are more important for different people

> DL : The deep learning framework will automatically find out features which are important for foace detection, with large amount of data

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

Why did Deep Learning become popular since the 2000s, and why do we use DL now? [3]

A

**1. Better algorithms and its understanding

  1. Very powerful computing infrastructures available (GPU, TPU, cloud – AWS, google colab)
  2. Large amount of resources online –> huge amount of labelled data packages, open source tools (keras, PyTorch, Tensorflow) and pretrained models
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are pretrained models?

A

Pretrained models are machine learning models that has been trained on a large amount of data and pre-existing knowledge. It has the optimal parameters and users just need to input their data into the model.

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

List some applications of DL in computer vision (other than object recognition/classification in pictures)

A
  1. Image segmentation (e.g. segmenting different objects in the image – e.g. there are 2 humans in the picture, and objects, so DL will segment the 2 humans as one class, and the same objects into another class etc)
  2. Style transfer – taking the style from the style image and applying it into input image (e.g. taking the style f a painting like Starry Night and applying it to a random image you took, image filters in apps and applying it to your pictures)
  3. Autocolouring of images
  4. Restoration of images by filling in missing pixels
  5. Image super resolution : e.g. take a 8x8 image and generate a 32 x 32 image which has a higher resolution. The original 8x8 image is called the GROUND TRUTH
  6. image synthesis – e.g. a synthesused horse image into a zebra image –> generatng an image of a horse with stripes of zebra (the process of artificially generating images that contain some particular desired content. )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

** What are the 2 properties of CNN?

A
  1. The patterns they learn are translation invariant. After learning a certain pattern in the lower right corner of a picture, a CNN can recognise it anywhere
  2. They can learn spatial hierachies of patterns –> a first layer will learn small local patterns such as edges, the second layer will learn larger patterns made of the features of the first layer etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the core of CNN (main components of CNN?

A
  1. Convolutional layer — consists of a series of filters known as convolutional kernels
  2. Filter / kernel — a matrix of integers that are used on a subset of the input pixel values.

Each pixel is multiplied by the corresponding kernel value in the kernel, result is summed up for a single value representing a grid cell (like a pixel) in the output feature map

  1. Input images
  2. Convolution operations — kernel strides over input matrix of numbers moving horizontally column by column,and then strides down vertically for subsequent rows. (left to right also )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the no of channels for input images for CNN?

A

RGB images — 3 channels
Black and white images - 1 channel

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

How can we normalise pixel values of images in CNN?

What is the purpose of normalising or standardising image pixels?

A

For RGB images, can normalise by dividing each pixel by 255.

Data normalization is an important step which ensures that each input parameter (pixel, in this case) has a similar data distribution. This makes convergence faster while training the network. It caan also avoid the possibility of exploding gradients.

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

What is the goal of the pooling layer?
Whaat functions are used?

A
  • Goal : to reduce computational, memory usage and number of parameters in the network by reducing the size of the image
  • max / mean aggregate functions are used
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the 4 different layers in a CNN?

A
  1. Input layer
  2. Convolutional layer
  3. Pooling layer
  4. Fully-connected layer (Dense layer)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does the fully-connected / dense layer do in CNN?

A

it classifies the image into its class
- like a normal neural network
- e.g. there a are 9 different classes of animals. Dense layer has neurons of 9 different output animal classes, and last dense layer has a single neuron to classify which animal the image is.

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

What does NLP deal with?

A

It deals with building computational algorithms to automatically analyze and represent human language.

It allows machines to have the ability to perform complex natural language related tasks.

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

Give some examples of applicatons of DL in NLP

A
  1. Google translate
  2. Google search
  3. Social meda analytics – DL model will analyse sentiments of users on social media to send targetted ads
  4. Chatbot – interact w humans by producing human-like conversatiions, provide useful info
  5. Google assistant / Alexa : receive human language, convert to text nd perform actions
  6. Grammarly - analyse semnatic info, following grammar rules
  7. Document classification / summarisation – classify resumes by extracting semantic info from document and provide relevant resumes to HR etc
17
Q

What kind of problems are RNNs designed for and what is a charateristic of RNN that differentiates it from an ANN?

A
  • Sequence problems (e.g. predicting next word in sentence)
  • Predictions made by RNN are dependent on previous preditions – i.e. the output of the netwirj may feedback as an input to the network with the next input.
18
Q

what are the 2 limitations of RNN?

A
  • It cannot predict long-term dependencies (all the words are stored in the memory of the hidden layer. As sentence gets longer, there is less memory to store previous words and these words may get forgotten as larger weights are given to new words)
  • Exploding / vanishing gradient problems
19
Q

What is the structure of LSTMs (Long Short Term Memory)?

What does an LSTM consist of?

A

An LSTM have memory blocks that are connected into layers

3 gates of LSTM
1. Input gate – decides which info from input to be used to update the memory state

  1. Forget gate : decides what info to discard that is not important from the previous timestamp.
  2. Output gate : decides what to output based on input and memory of the unit
20
Q

How are words represented in one hot encoding?

A
  • All words are represented by a 1xN vector, where N is the number of words in a sentence
21
Q

How are words represented in word embedding?

A

They are also represented as vectors, but lower dimensional as relationship between words are learnt