李宏毅——一天搞懂深度学习PPT学习笔记

李宏毅一天搞懂机器学习PPT,SildeShare链接:https://www.slideshare.net/tw_dsconf/ss-62245351?qid=108adce3-2c3d-4758-a830-95d0a57e46bc&v=&b=&from_search=3
也可以在csdn下载中下载(资源附学习笔记全文):https://download.csdn.net/download/wozaipermanent/11998637

1 Introduction of Deep Learning

1.1 Three Steps for Deep Learning

  • Step1: define a set of function (Neural Network)
  • Step2: goodness of function
  • Step3: pick the best function

1.2 Step1: Neural Network

李宏毅——一天搞懂深度学习PPT学习笔记_第1张图片
李宏毅——一天搞懂深度学习PPT学习笔记_第2张图片
李宏毅——一天搞懂深度学习PPT学习笔记_第3张图片

1.2.1 Fully Connect Feedforward Network

李宏毅——一天搞懂深度学习PPT学习笔记_第4张图片

1.2.2 Output Layer(Option)

李宏毅——一天搞懂深度学习PPT学习笔记_第5张图片

  • Softmax(归一化指数函数):它能将一个含任意实数的k维向量Z“压缩”到另一个k维向量 σ ( Z ) \sigma(Z) σ(Z)中,使得每一个元素的范围都在(0, 1)之间,并且所有元素的和为1。

1.2.3 Example Application

  • Handwriting Digit Recognition
    李宏毅——一天搞懂深度学习PPT学习笔记_第6张图片

1.3 Step2: Goodness of Function

1.3.1 Learning Target

李宏毅——一天搞懂深度学习PPT学习笔记_第7张图片

1.3.2 Loss

李宏毅——一天搞懂深度学习PPT学习笔记_第8张图片

  • Total Loss:

李宏毅——一天搞懂深度学习PPT学习笔记_第9张图片

1.4 Step3: Pick the Best Function

1.4.1 Gradient Descent

李宏毅——一天搞懂深度学习PPT学习笔记_第10张图片

  • RBM(Restricted Boltzmann Machine): 受限玻尔兹曼机,这部分可以参考链接:https://zhuanlan.zhihu.com/p/22794772

  • Then Compute ∂ L / ∂ w \partial L / \partial w L/w , if Negative then Increase w; elif Positive then decrease w

李宏毅——一天搞懂深度学习PPT学习笔记_第11张图片

  • η \eta η is called “learning rate”

李宏毅——一天搞懂深度学习PPT学习笔记_第12张图片

Gradient Descent Diagram:

在这里插入图片描述

  • Randomly pick a starting point

1.4.2 Gradient Descent Difficulty

李宏毅——一天搞懂深度学习PPT学习笔记_第13张图片

  • Backpropagation(反向传播算法):an efficient way to compute ∂ L / ∂ w \partial L / \partial w L/w , link below:
    • http://speech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2015_2/Lecture/DNN%20backprop.ecm.mp4/index.html
    • https://www.jianshu.com/p/2e02bc6384a8

1.5 Deep is Better

1.5.1 Universality Theorem

  • Any continuous function f : R N → R M f: R^N → R^M f:RNRM can be realized by a network with one hidden layer (given enough hidden neurons). Ref: http://neuralnetworksanddeeplearning.com/chap4.html

1.5.2 Thin + Tall is Better

  • Neural network consists of neurons

  • A hidden layer network can represent any continuous function

  • Using multiple layers of neurons to represent some functions are much simper

  • Less parameters, less data

1.5.3 Modularization

李宏毅——一天搞懂深度学习PPT学习笔记_第14张图片

1.6 Toolkit

1.6.1 Keras

李宏毅——一天搞懂深度学习PPT学习笔记_第15张图片

  • Documentation: https://keras.io or https://morvanzhou.github.io/tutorials/machine-learning/keras/

1.6.2 Example of Handwriting Digit Recognition

Step1: define a set of function

李宏毅——一天搞懂深度学习PPT学习笔记_第16张图片

Step2: goodness of function

李宏毅——一天搞懂深度学习PPT学习笔记_第17张图片

Step3: pick the best function

李宏毅——一天搞懂深度学习PPT学习笔记_第18张图片

Testing

score = model.evaluate(x_test, y_test)
print('Total loss on Testing Set: ', score[0])
print('Accuracy of Testing Set: ', score[1])
result = model.predict(x_test)

1.6.3 GPU to Speeding Training

  • Way1

    THEANO_FLAGGS=device=gpu0 python YourCode.py
    
  • Way2

    import os
    os.environ["THEANO_FLAGS"] = "device=gpu0"
    

2 Tips for Training Deep Neural Network

2.1 Good Results on Training Data

2.1.1 Choosing Proper Loss

李宏毅——一天搞懂深度学习PPT学习笔记_第19张图片

2.1.2 Mini-Batch

李宏毅——一天搞懂深度学习PPT学习笔记_第20张图片

2.1.3 New Activation Function

Vanishing Gradient Problem

李宏毅——一天搞懂深度学习PPT学习笔记_第21张图片

ReLU

李宏毅——一天搞懂深度学习PPT学习笔记_第22张图片

model.add(Activation('sigmoid'))
model.add(Activation('relu'))

李宏毅——一天搞懂深度学习PPT学习笔记_第23张图片

ReLU - variant

李宏毅——一天搞懂深度学习PPT学习笔记_第24张图片

2.1.4 Adaptive Learning Rate

Learning Rates

  • If learning rate is too large, total loss may not decrease after each update
  • If learning rate is too small, training would be too slow

李宏毅——一天搞懂深度学习PPT学习笔记_第25张图片

Adagrad

李宏毅——一天搞懂深度学习PPT学习笔记_第26张图片

Notes:

  • Learning rate is smaller and smaller for all parameters
  • Smaller derivatives, larger learning rate, and vice versa

2.1.5 Momentum

李宏毅——一天搞懂深度学习PPT学习笔记_第27张图片

  • Adam: RMSProp (Advanced Adagrad) + Momentum. Adam (Adaptive Moment Estimation)本质上是带有动量项的RMSprop,它利用梯度的一阶矩估计和二阶矩估计动态调整每个参数的学习率。Adam的优点主要在于经过偏置校正后,每一次迭代学习率都有个确定范围,使得参数比较平稳。
    李宏毅——一天搞懂深度学习PPT学习笔记_第28张图片

2.2 Good Results on Testing Data

2.2.1 Early Stopping

Why Overfitting

  • Learning target is defined by the training data.
  • The parameters achieving the learning target do not necessary have good results on the testing data.

Early Stopping

李宏毅——一天搞懂深度学习PPT学习笔记_第29张图片

2.2.2 Weight Decay

Weight decay is one kind of regularization.

  • Our brain prunes out the useless link between neurons.
  • Doing the same thing to machine’s brain imporves the performance.
    李宏毅——一天搞懂深度学习PPT学习笔记_第30张图片

2.2.3 Dropout

Training

李宏毅——一天搞懂深度学习PPT学习笔记_第31张图片

  • Each time before updating the parameters

    • Each neuron has p% to dropout
      • The structure of the network is changed.
    • Using the new network for training
  • For each mini-batch, we resample the dropout neurons

Testing

李宏毅——一天搞懂深度学习PPT学习笔记_第32张图片

Dropout - Intuitive Reason

李宏毅——一天搞懂深度学习PPT学习笔记_第33张图片

Drop is a Kind of Ensemble

李宏毅——一天搞懂深度学习PPT学习笔记_第34张图片

Try It

李宏毅——一天搞懂深度学习PPT学习笔记_第35张图片

2.2.4 Network Structure

e.g. CNN is another good example.

3 Variants of Neural Network

3.1 Convolutional Neural Network (CNN)

3.1.1 Why CNN for Image

  • When processing image, the first layer of fully connected network would be very large.
  • Some patterns are much smaller than the whole image. A neuron does not have to see the whole image to discover the pattern.
  • The same patterns appear in different regions.
    李宏毅——一天搞懂深度学习PPT学习笔记_第36张图片
  • Subsampling the pixels will not change the object, so we can subsample the pixels to make image smaller.

3.1.2 Three Steps

Step1: Convolutional Neural Network

李宏毅——一天搞懂深度学习PPT学习笔记_第37张图片

Convolution

李宏毅——一天搞懂深度学习PPT学习笔记_第38张图片

Max Pooling

李宏毅——一天搞懂深度学习PPT学习笔记_第39张图片

  • Smaller than the original image.
  • The number of the channel is the number of filters.
Flatten

李宏毅——一天搞懂深度学习PPT学习笔记_第40张图片

Summary

李宏毅——一天搞懂深度学习PPT学习笔记_第41张图片

Step2: goodness of function & Step3: pick the best function

李宏毅——一天搞懂深度学习PPT学习笔记_第42张图片

3.2 Recurrent Neural Network (RNN)

Step1: Recurrent Neural Network

李宏毅——一天搞懂深度学习PPT学习笔记_第43张图片

LSTM

李宏毅——一天搞懂深度学习PPT学习笔记_第44张图片

Step2: goodness of function

李宏毅——一天搞懂深度学习PPT学习笔记_第45张图片

Step3 : pick the best function

李宏毅——一天搞懂深度学习PPT学习笔记_第46张图片

4 Next Wave

4.1 Supervised Learning

4.1.1 Ultra Deep Network

李宏毅——一天搞懂深度学习PPT学习笔记_第47张图片

4.1.2 Attention Model

李宏毅——一天搞懂深度学习PPT学习笔记_第48张图片

4.2 Reinforcement Learning

4.2.1 Scenario of Reinforcement Learning

李宏毅——一天搞懂深度学习PPT学习笔记_第49张图片

4.2.2 Supervised v.s. Reinforcement

李宏毅——一天搞懂深度学习PPT学习笔记_第50张图片

4.2.3 Difficulties of Reinforcement Learning

  • It may be better to sacrifice immediate reward to gain more long-term reward.
  • Agent’s actions affect the subsequent data it receives.

4.3 Unsupervised Learning

4.3.1 Image: Realizing what the World Looks Like

李宏毅——一天搞懂深度学习PPT学习笔记_第51张图片

4.3.2 Text: Understanding the Meaning of Words

  • Machine learn the meaning of words from reading a lot of documents without supervision
  • A word can be understood by its context

4.3.3 Audio: Learning Human Language Without Supervision

  • Audio segment corresponding to an unknown word (Fixed-length vector)
  • The audio segments correspondsing to words with similar pronunciations are close to each other.
    李宏毅——一天搞懂深度学习PPT学习笔记_第52张图片

你可能感兴趣的:(深度学习)