使用深度学习解决Fashion-Mnist分类问题

• Problem Description

https://github.com/zalandoresearch/fashion-mnist

• Solution Design

先使用全连接神经网络

• Data Preparation

matlab打开数据集:https://blog.csdn.net/tracer9/article/details/51253604

数据集数量:60000+10000数据集内容: Zalando’s article images单个样本大小:28*28

• Network Structure, Network Training, Experimental Results

训练1(error)

max_iter = 600mini_batch = 40alpha = 0.05data:28x28x8000layer_size: input+56(0);270;90;30;10w: randn()*sqrt(6/(n{l}+n{l+1}))sigmoidJ: 0.5/mini_batch*Σ(a{L}-y)
在这里插入图片描述
本来最后是有:

591/600 epochs: J=0.0431 Acc=0.9500
592/600 epochs: J=0.0358 Acc=0.9500
593/600 epochs: J=0.0304 Acc=1.0000
594/600 epochs: J=0.0425 Acc=0.9250
595/600 epochs: J=0.0374 Acc=0.9500
596/600 epochs: J=0.0407 Acc=0.9500
597/600 epochs: J=0.0818 Acc=0.8750
598/600 epochs: J=0.0162 Acc=0.9750
599/600 epochs: J=0.0327 Acc=0.9500
600/600 epochs: J=0.0695 Acc=0.9250

但是很奇怪的是:

Accuracy on training dataset is 1.150000%
Accuracy on testing dataset is 3.900000%

不知道什么情况,可能是测试逻辑不对?
哦。。。原来直接复制了上一次代码的某句话导致错误。。。

% prepare labels
% [~,ind_label]=max(trainLabels(:,ind((k-1)*mini_batch+1:min(k*mini_batch,train_size))));
% prepare targets
% y=audio(:,ind_label);
y = trainLabels(:,ind((k-1)*mini_batch+1:min(k*mini_batch,train_size)));

训练2(84.50%)

…参数同训练1

修改错误,重新训练
在这里插入图片描述

Accuracy on training dataset is 92.287500%
Accuracy on testing dataset is 84.500000%

训练3(86.60%)

train_data: 20000test_data: 5000…其他参数同训练1

只是加大了数据量
在这里插入图片描述

Accuracy on training dataset is 94.825000%
Accuracy on testing dataset is 86.600000%

训练4(88.75%)

train_data: 60000(all in)test_data: 10000max_iter = 487(emmm半夜要停电)…其他参数同训练1

同样只是加大了数据量
在这里插入图片描述
几乎没有变化

Accuracy on training dataset is 96.681667%
Accuracy on testing dataset is 88.750000%

训练5(fail)

train_data: 60000(all in)test_data: 10000max_iter = 600relulayer_size: input+56(0);401;191;92;44;21;10…其他参数同训练1
在这里插入图片描述

Accuracy on training dataset is 10.000000%
Accuracy on testing dataset is 10.000000%

训练6

train_data: 60000(all in)test_data: 10000max_iter = 600sigm…其他参数同训练1

在这里插入图片描述

Accuracy on training dataset is 97.621667%
Accuracy on testing dataset is 88.460000%

• Conclusion

• Implement Code

• References (at least two references)

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐