当前位置:网站首页>5. Over fitting, dropout, regularization
5. Over fitting, dropout, regularization
2022-07-08 01:02:00 【booze-J】
article
Over fitting
Over fitting leads to larger test error :
You can see that as the model structure becomes more and more complex , The error of training set is getting smaller and smaller , The error of the test set decreases first and then increases , Over fitting leads to larger test error .
The better case is that the two lines of training error and test error are relatively close .
Prevent over fitting
1. Increase the data set
There is a popular saying in the field of data mining ,“ Sometimes having more data is better than a good model ”. Generally speaking, more data participate in training , The better the training model . If there is too little data , And if the neural network we build is too complex, it is easier to produce the phenomenon of over fitting .
2.Early stopping
In training the model , We often set a relatively large number of generations .Early stopping It is a strategy to end training in advance to prevent over fitting .
The general practice is to record the best so far validation accuracy, As the continuous 10 individual Epoch Not reaching the best accuracy when , You could say accuracy It's not improving anymore . At this point you can stop iterating (Early Stopping).
3.Dropout
Every time I train , Will turn off some neurons randomly , Closing does not mean removing , Instead, these dotted neurons do not participate in training . Pay attention to the general training , When testing the model , Is to use all neurons , It's not going to happen dropout.
4. Regularization
C0 Represents the original cost function ,n Represents the number of samples , λ \lambda λ That's the coefficient of the regular term , Weigh regular terms against C0 Proportion of items .
L1 Regularization :
L1 Regularization can achieve the effect of sparseness of model parameters .
L2 Regularization :
L2 Regularization can attenuate the weight of the model , Make the model parameter values close to 0.
When λ \lambda λ=0.001 when , Over fitting phenomenon appears , When λ \lambda λ=0.01 when , There is a slight over fitting , When λ \lambda λ=0.1 There was no fitting phenomenon when .
边栏推荐
- 【GO记录】从零开始GO语言——用GO语言做一个示波器(一)GO语言基础
- 50MHz generation time
- 英雄联盟胜负预测--简易肯德基上校
- [deep learning] AI one click to change the sky
- Application practice | the efficiency of the data warehouse system has been comprehensively improved! Data warehouse construction based on Apache Doris in Tongcheng digital Department
- Complete model verification (test, demo) routine
- Deep dive kotlin collaboration (the end of 23): sharedflow and stateflow
- Is it safe to open an account on the official website of Huatai Securities?
- Fofa attack and defense challenge record
- 9. Introduction to convolutional neural network
猜你喜欢
13.模型的保存和載入
[deep learning] AI one click to change the sky
1293_ Implementation analysis of xtask resumeall() interface in FreeRTOS
国内首次,3位清华姚班本科生斩获STOC最佳学生论文奖
基于微信小程序开发的我最在行的小游戏
Kubernetes Static Pod (静态Pod)
完整的模型训练套路
Su embedded training - Day6
接口测试进阶接口脚本使用—apipost(预/后执行脚本)
14. Draw network model structure
随机推荐
Codeforces Round #804 (Div. 2)(A~D)
13.模型的保存和載入
DNS series (I): why does the updated DNS record not take effect?
Course of causality, taught by Jonas Peters, University of Copenhagen
基于卷积神经网络的恶意软件检测方法
NVIDIA Jetson test installation yolox process record
【深度学习】AI一键换天
Y59. Chapter III kubernetes from entry to proficiency - continuous integration and deployment (III, II)
Hotel
Analysis of 8 classic C language pointer written test questions
[Yugong series] go teaching course 006 in July 2022 - automatic derivation of types and input and output
《因果性Causality》教程,哥本哈根大学Jonas Peters讲授
133. 克隆图
Which securities company has a low, safe and reliable account opening commission
STL -- common function replication of string class
[OBS] the official configuration is use_ GPU_ Priority effect is true
Complete model verification (test, demo) routine
12.RNN应用于手写数字识别
How is it most convenient to open an account for stock speculation? Is it safe to open an account on your mobile phone
Su embedded training - Day6