台大李宏毅机器学习2021
ML 2021 Spring (ntu.edu.tw)https://speech.ee.ntu.edu.tw/~hylee/ml/2021-spring.htmlDiscussion:ML2021Spring-hw1 | Kaggle
Different types of functions。How to find a function?
Regression:The function outputs as a scalar.
Classification:Given options(classes),the function outputs the correct one.
?Structured Learning:create something with structure(image,documents)?.?
1、Training
1.1、Model
1.2、Loss
? ? ? ? ? ? ? ? define loss from training data
? ? ? ? ? ? ? ? loss is a function of parameters
? ? ? ? ? ? ? ? How good a set of values is.
If y and??are both probability distributions------->Cross-entropy.??
1.3、Optimization
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?find the best???to get min L.?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? way:Gradient Descent.
?在做機器學習需要自己設定的東西叫做hyperparameters(就是你自己決定的東西,人所設的東西不是機器自己找出來的)。
hyperparameters:learning rate、Batch size、
?Batch、Epoch:
(L表示所有數據N在一起計算時產生的Loss,表示一個batch作為一個數據包計算時產生的Loss,根據算出gradient,然后再更新參數......再取下一個batch計算,同理如下)
---所以我們并不是拿大L來計算Gradient,實際上我們是拿一個Batch算出來的L1L2L3來計算Gradient,把所有的batch都看過一次(也就是都計算一次)叫做一個Epoch,每一次更新參數叫做一次Update。-----所以Update和Epoch是不一樣的東西,每次更新一次參數叫做一次Update,把所有的Batch都看過一遍叫做一個Epoch(所以一個Epoch并不是更新參數一次而是N/B)。
PS:在把所有的資料分成一個個Batch的時候,會做一件事情叫做Shuffle,Shuffle有很多不同的做法,但是常見的做法是:在每一個Epoch開始之前會分一次Batch,然后每一個Epoch的batch都不一樣;所以哪一些數據在同一個Epoch里面,每一個Epoch都不一樣的;叫做shuffle(洗牌)。
?
?
?Rectified Linear? Unit(ReLu):兩個ReLu和起來是一個hard sigmoid;
?
?https://speech.ee.ntu.edu.tw/~hylee/ml/ml2021-course-data/hw/Colab/Google_Colab_Tutorial.pdf
?
2、
?模型的彈性:
模型很復雜:
總結
以上是生活随笔為你收集整理的台大李宏毅机器学习2021的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: (一)神经网络训练不起来怎么办:局部最小
- 下一篇: YOLOv4中的tricks概念总结——