资源简介
神经网络学习算法,包括GradientDescent,Momentum,Adagrad,RMSprop,Adam优化方法,matlab程序
代码片段和文件信息
function [w0 w1 b0 b1] = Optimizer(config LearnRate IterationNum ...
w0 w1 b0 b1 ...
dw0 dw1 db0 db1 ...
w0_v w1_v b0_v b1_v ...
w0_S w1_S b0_S b1_S)
Optimizer = config.optimizer;
MomentumFactor = config.momentum_factor;
RMSFactor = config.rmsprop_factor;
AdamFactor = config.adam_factor;
switch(Optimizer)
case ‘GradientDescent‘ %学习率0.55左右
w0 = w0 - LearnRate * dw0;
w1 = w1 - LearnRate * dw1;
b0 = b0 - LearnRate * db0;
b1 = b1 - LearnRate * db1;
case ‘Momentum‘ %学习率0.5左右
w0_v = w0_v * MomentumFactor + dw0;%与w0_v = w0_v * MomentumFactor + LearnRate *dw0计算方法最后迭代结果一样
w0 = w0 - LearnRate * w0_v;
w1_v = w1_v * MomentumFactor + dw1;
w1 = w1 - LearnRate * w1_v;
b0_v = b0_v * MomentumFactor + db0;
b0 = b0 - LearnRate * b0_v;
b1_v = b1_v * MomentumFactor + db1;
b1 = b1 - LearnRate * b1_v;
case ‘Adagrad‘ %学习率0.004左右
% updata w0 and b0
w0_S = w0_S + dw0.^2;
b0_S = b0_S + db0.^2;
w0 = w0 - LearnRate * dw0 ./ sqrt(w0_S + 10^(-8));
b0 = b0 - LearnRate * db0 ./ sqrt(b0_S + 10^(-8));
% updata w1 and b1
w1_S = w1_S + dw1.^2;
b1_S = b1_S + db1.^2;
w1 = w1 - LearnRate * dw1 ./ sqrt(w1_S + 10^(-8));
b1 = b1 - LearnRate * db1 ./ sqrt(b1_S + 10^(-8));
case ‘RMSprop‘ %对学习率非常敏感,0.00026相对最优
% updata w0 and b0
w0_S = RMSFactor * w0_S + (1 - RMSFactor) * dw0.^2;
b0_S = RMSFactor * b0_S + (1 - RMSFactor) * db0.^2;
w0_v = MomentumFactor * w0_v + LearnRate * dw0 ./ sqrt(w0_S + 10^(-8));
b0_v = MomentumFactor * b0_v + LearnRate * db0 ./ sqrt(b0_S + 10^(-8));
相关资源
- 基于深度学习的汽车目标检测
- 人工智能八数码问题过程表示求解m
- 深度学习Matlab代码,亲测可以用。有
- 完美可运行Google net
- 人工智能蜂群算法ABCMATLAB版本带注释
- 流形学习工具包包括8种经典流形学习
- adaboost 演示demo基于Matlab,学习算法包
- install_supportsoftware_VGG19.exe
- CNN深度学习识别字符matlab
- 稀疏自编码深度学习的Matlab实现
- matlab 深度学习toolbox(Deep Learn Toolbo
- 受限玻尔兹曼机matlab源代码
- 机器学习、人工智能、数据挖掘中经
- 深度学习汽车目标检测matlab2017
- 稀疏贝叶斯学习算法SBL-FM算法
- MATLAB2019b.zip
- 人工智能算法 多机器人路径规划协同
- 卷积(convolutional )受限玻尔兹曼机(
- 深度学习领域,dbn网络的训练代码
- 基于adaboost和深度学习网络的人脸表情
- 深度学习模型代码
- ksvd algorithm and psnr ksvd字典学习算法
- 深度学习源代码
- CNN 深度学习模型
- 一些深度学习的工具包和例程
- 深度学习matlab工具箱(DeepLearnToolbox
- CNN-Toolbox matlab的深度学习工具箱
- SparseAutoencoder MATLAB实现的深度学习自
- Q学习算法来实现的机器人路径规划
- 深度学习matlab源码
评论
共有 条评论