目录
采用附加动量法和自适应学习率设计来改进bp神经网络的迭代速度,如果不迭代学习率会提高精度;迭代学习率(自适应)会加快收敛,但精度降低(Matlab代码实现)
clear all;
close all;
clc;
er = [];
load mnist_uint8; %用自己的数据
for idj = 1:10
train_x = double(train_x) / 255;
test_x = double(test_x) / 255;
train_y = double(train_y);
test_y = double(test_y);
mu=mean(train_x);
sigma=max(std(train_x),eps);
train_x=bs