deep learning实践经验总结2--准确率再次提升,到达0.8,再来总结一下
来源:互联网 发布:蓝月传奇英雄翅膀数据 编辑:程序博客网 时间:2024/04/30 14:04
deep learning实践经验总结2
最近拿caffe来做图片分类,遇到不少问题,同时也吸取不少教训和获得不少经验。
这次拿大摆裙和一步裙做分类,
多次训练效果一直在0.7,后来改动了全链接层的初始化参数。高斯分布的标准差由0.001改为0.0001,就是调小了。
然后效果很明显,准确率高了,权重图画出来后,也看得出是有意义的了,部分权重图是人的轮廓或者裙子的轮廓。
先看看图片:
大摆裙
一步裙
然后找一些响应图看一下,当然我这里展示的是一些效果好的响应图。
大摆裙
一步裙
一些权重图:
这是网络的结构参数:
name: "CIFAR10_full_train"layers { layer { name: "cifar" type: "data" #source: "/home/linger/linger/testfile/crop_train_db" #source: "/home/linger/linger/testfile/collar_train_db" source: "/home/linger/linger/testfile/skirt_train_db" #source: "/home/linger/linger/testfile/pattern_train_db" meanfile: "/home/linger/linger/testfile/skirt_train_mean.binaryproto" #cropsize: 200 batchsize: 20 } top: "data" top: "label"}layers { layer { name: "conv1" type: "conv" num_output: 16 kernelsize: 5 stride:1 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0. } blobs_lr: 1. blobs_lr: 1. weight_decay: 0.001 weight_decay: 0. } bottom: "data" top: "conv1"}layers { layer { name: "relu1" type: "relu" } bottom: "conv1" top: "conv1"}layers { layer { name: "pool1" type: "pool" pool: MAX kernelsize: 2 stride:1 } bottom: "conv1" top: "pool1"}layers { layer { name: "conv2" type: "conv" num_output: 16 group: 2 kernelsize: 5 stride:1 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0. } blobs_lr: 1. blobs_lr: 1. weight_decay: 0.001 weight_decay: 0. } bottom: "pool1" top: "conv2"}layers { layer { name: "relu2" type: "relu" } bottom: "conv2" top: "conv2"}layers { layer { name: "pool2" type: "pool" pool: MAX kernelsize: 2 stride: 1 } bottom: "conv2" top: "pool2"}layers { layer { name: "ip1" type: "innerproduct" num_output: 100 weight_filler { type: "gaussian" std: 0.0001 } bias_filler { type: "constant" value: 0. } blobs_lr: 1. blobs_lr: 1. weight_decay: 0.001 weight_decay: 0. } bottom: "pool2" top: "ip1"}layers { layer { name: "ip2" type: "innerproduct" num_output: 2 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0. } blobs_lr: 1. blobs_lr: 1. weight_decay: 0.001 weight_decay: 0. } bottom: "ip1" top: "ip2"}#-----------------------output------------------------layers { layer { name: "loss" type: "softmax_loss" } bottom: "ip2" bottom: "label"}
name: "CIFAR10_full_test"layers { layer { name: "cifar" type: "data" #source: "/home/linger/linger/testfile/collar_test_db" #source: "/home/linger/linger/testfile/crop_test_db" source: "/home/linger/linger/testfile/skirt_test_db" #source: "/home/linger/linger/testfile/pattern_test_db" meanfile: "/home/linger/linger/testfile/skirt_test_mean.binaryproto" #cropsize: 200 batchsize: 10 } top: "data" top: "label"}layers { layer { name: "conv1" type: "conv" num_output: 16 kernelsize: 5 stride:1 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0. } blobs_lr: 1. blobs_lr: 1. weight_decay: 0.001 weight_decay: 0. } bottom: "data" top: "conv1"}layers { layer { name: "relu1" type: "relu" } bottom: "conv1" top: "conv1"}layers { layer { name: "pool1" type: "pool" pool: MAX kernelsize: 2 stride:1 } bottom: "conv1" top: "pool1"}layers { layer { name: "conv2" type: "conv" num_output: 16 group: 2 kernelsize: 5 stride:1 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0. } blobs_lr: 1. blobs_lr: 1. weight_decay: 0.001 weight_decay: 0. } bottom: "pool1" top: "conv2"}layers { layer { name: "relu2" type: "relu" } bottom: "conv2" top: "conv2"}layers { layer { name: "pool2" type: "pool" pool: MAX kernelsize: 2 stride: 1 } bottom: "conv2" top: "pool2"}layers { layer { name: "ip1" type: "innerproduct" num_output: 100 weight_filler { type: "gaussian" std: 0.0001 } bias_filler { type: "constant" value: 0. } blobs_lr: 1. blobs_lr: 1. weight_decay: 0.001 weight_decay: 0. } bottom: "pool2" top: "ip1"}layers { layer { name: "ip2" type: "innerproduct" num_output: 2 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0. } blobs_lr: 1. blobs_lr: 1. weight_decay: 0.001 weight_decay: 0. } bottom: "ip1" top: "ip2"}#-----------------------output------------------------layers { layer { name: "prob" type: "softmax" } bottom: "ip2" top: "prob"}layers { layer { name: "accuracy" type: "accuracy" } bottom: "prob" bottom: "label" top: "accuracy"}
# reduce learning rate after 120 epochs (60000 iters) by factor 0f 10# then another factor of 10 after 10 more epochs (5000 iters)# The training protocol buffer definitiontrain_net: "cifar10_full_train.prototxt"# The testing protocol buffer definitiontest_net: "cifar10_full_test.prototxt"# test_iter specifies how many forward passes the test should carry out.# In the case of CIFAR10, we have test batch size 100 and 100 test iterations,# covering the full 10,000 testing images.test_iter: 20# Carry out testing every 1000 training iterations.test_interval: 100# The base learning rate, momentum and the weight decay of the network.base_lr: 0.00001momentum: 0.9weight_decay: 0.004# The learning rate policylr_policy: "fixed"# Display every 200 iterationsdisplay: 20# The maximum number of iterationsmax_iter: 60000# snapshot intermediate resultssnapshot: 1000snapshot_prefix: "cifar10_full"# solver mode: 0 for CPU and 1 for GPUsolver_mode: 1
真的是多玩数据,才会对数据形成一种感觉啊。
下次玩3类的。敬请期待!
2 0
- deep learning实践经验总结2--准确率再次提升,到达0.8,再来总结一下
- deep learning实践经验总结
- 《Deep Learning》中文翻译总结
- deep learning 博客总结
- Learning Perl总结提升
- Deep Learning 总结与展望
- Deep Learning 优化方法总结
- Deep Learning 优化方法总结
- Deep Learning 优化方法总结
- Deep Learning 优化方法总结
- Deep Learning 备忘与总结
- deep-learning基本概念链接总结
- Java NIO 实践经验总结
- WTL实践经验总结(不断更新)
- Web前端实践经验总结
- 滴滴:WebApp实践经验总结
- Deep Learning (深度学习) 学习总结
- Neural Networks and Deep Learning总结
- Gson简要使用笔记
- The Swift Programming Language 中文翻译
- 手机领域又来了一个搅局者
- Makefile的编写
- MySQL关系数据库
- deep learning实践经验总结2--准确率再次提升,到达0.8,再来总结一下
- Android进阶—内存优化
- 关于推送
- JVM常用的调优参数
- 简单易学的机器学习算法——分类回归树CART
- 49_leetcode_Longest Valid Parentheses
- 向量相似度度量(一):EMD (Earth Mover's Distance)
- 笔记
- socket中的TIME_WAIT状态