博客
关于我
深度残差网络:ResNet
阅读量:323 次
发布时间:2019-03-03

本文共 4759 字,大约阅读时间需要 15 分钟。

ResNet:

一、介绍

这里写图片描述

name: "ResNet_50_1by2"layer {  name: "data"  type: "Input"  top: "data"  input_param { shape: { dim: 1 dim: 3 dim: 224 dim: 224 } }   // 第一个维度是图片数,第二个是通道数,后面的是图片的长宽}layer {  name: "conv_1"  type: "Convolution"  bottom: "data"  top: "conv_1"  param {    lr_mult: 1    decay_mult: 1  }  param {    lr_mult: 2    decay_mult: 0  }  convolution_param {    num_output: 64    pad: 3    kernel_size: 7    stride: 2    weight_filler {      type: "xavier"    }    bias_filler {      type: "constant"      value: 0    }  }}

shape {

dim: 1 #num,可自行定义
dim: 3 #通道数,表示RGB三个通道
dim: 32 #图像的长和宽,通过 _train_test.prototxt文件中数据输入层的crop_size获取
dim: 32}

二、训练

深度残差网(deep residual networks)的训练过程

1、下载基于python的训练代码:

这里写图片描述

2、pyfunt需要安装:

@ubuntu:~$ sudo pip install git+git://github.com/dnlcrl/PyFunt.gitDownloading/unpacking git+git://github.com/dnlcrl/PyFunt.git  Cloning git://github.com/dnlcrl/PyFunt.git to /tmp/pip-MS88tP-build    customize UnixCCompiler    warning: no files found matching 'setupegg.py'    warning: no files found matching 'bscript'    warning: no files found matching 'bento.info'    warning: no files found matching '*' under directory 'doc'    warning: no files found matching 'tox.ini'    warning: no previously-included files matching '*_subr_*.f' found under directory 'pyfunt/linalg/src/id_dist/src'    no previously-included directories found matching 'doc/build'    no previously-included directories found matching 'doc/source/generated'    no previously-included directories found matching '*/__pycache__'    warning: no previously-included files matching '*~' found anywhere in distribution    warning: no previously-included files matching '*.bak' found anywhere in distribution    warning: no previously-included files matching '*.swp' found anywhere in distribution    warning: no previously-included files matching '*.pyo' found anywhere in distributionSuccessfully installed numpy tqdm cython torchfile pyfuntCleaning up...

3、

@ubuntu:~/deep-residual-networks-pyfunt$ git clone https://github.com/dnlcrl//PyDatSetCloning into 'PyDatSet'...remote: Counting objects: 185, done.remote: Total 185 (delta 0), reused 0 (delta 0), pack-reused 185Receiving objects: 100% (185/185), 29.90 KiB | 11.00 KiB/s, done.Resolving deltas: 100% (111/111), done.Checking connectivity... done.
@ubuntu:~/deep-residual-networks-pyfunt/PyDatSet$ sudo python setup.py install[sudo] password for wei: /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'  warnings.warn(msg)running installrunning buildrunning build_pyrunning install_libcreating /usr/local/lib/python2.7/dist-packages/pydatsetcopying build/lib.linux-x86_64-2.7/pydatset/gtsrb.py -> /usr/local/lib/python2.7/dist-packages/pydatsetcopying build/lib.linux-x86_64-2.7/pydatset/__init__.py -> /usr/local/lib/python2.7/dist-packages/pydatsetcopying build/lib.linux-x86_64-2.7/pydatset/sfddd.py -> /usr/local/lib/python2.7/dist-packages/pydatsetcopying build/lib.linux-x86_64-2.7/pydatset/tiny_imagenet.py -> /usr/local/lib/python2.7/dist-packages/pydatsetcopying build/lib.linux-x86_64-2.7/pydatset/cifar10.py -> /usr/local/lib/python2.7/dist-packages/pydatsetcopying build/lib.linux-x86_64-2.7/pydatset/mnist.py -> /usr/local/lib/python2.7/dist-packages/pydatsetcopying build/lib.linux-x86_64-2.7/pydatset/data_augmentation.py -> /usr/local/lib/python2.7/dist-packages/pydatsetbyte-compiling /usr/local/lib/python2.7/dist-packages/pydatset/gtsrb.py to gtsrb.pycbyte-compiling /usr/local/lib/python2.7/dist-packages/pydatset/__init__.py to __init__.pycbyte-compiling /usr/local/lib/python2.7/dist-packages/pydatset/sfddd.py to sfddd.pycbyte-compiling /usr/local/lib/python2.7/dist-packages/pydatset/tiny_imagenet.py to tiny_imagenet.pycbyte-compiling /usr/local/lib/python2.7/dist-packages/pydatset/cifar10.py to cifar10.pycbyte-compiling /usr/local/lib/python2.7/dist-packages/pydatset/mnist.py to mnist.pycbyte-compiling /usr/local/lib/python2.7/dist-packages/pydatset/data_augmentation.py to data_augmentation.pycrunning install_egg_infoWriting /usr/local/lib/python2.7/dist-packages/pydatset-0.1.egg-infowei@ubuntu:~/deep-residual-networks-pyfunt/PyDatSet$

The CIFAR-10 dataset

DownloadIf you're going to use this dataset, please cite the tech report at the bottom of this page.Version     Size    md5sumCIFAR-10 python version     163 MB  c58f30108f718f92721af3b95e74349aCIFAR-10 Matlab version     175 MB  70270af85842c9e89bb428ec9976c926CIFAR-10 binary version (suitable for C programs)   162 MB  c32a1d4ab5d03f1284b67883e8d87530

参考资料:

LeNet、AlexNet、GoogLeNet、VGG、ResNet

使用caffe测试自己的图片

神经网络与深度学习 Caffe部署中的几个train-test-solver-prototxt-deploy等说明<三>

Kaiming He

[caffe]深度学习之MSRA图像分类模型Deep Residual Network(深度残差网络)解读

使用Keras搭建深度残差网络

梯度下降优化算法综述

深度学习所有文章

你可能感兴趣的文章
mysql 权限登录问题:ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
查看>>
MYSQL 查看最大连接数和修改最大连接数
查看>>
MySQL 查看有哪些表
查看>>
mysql 查看锁_阿里/美团/字节面试官必问的Mysql锁机制,你真的明白吗
查看>>
MySql 查询以逗号分隔的字符串的方法(正则)
查看>>
MySQL 查询优化:提速查询效率的13大秘籍(避免使用SELECT 、分页查询的优化、合理使用连接、子查询的优化)(上)
查看>>
mysql 查询数据库所有表的字段信息
查看>>
【Java基础】什么是面向对象?
查看>>
mysql 查询,正数降序排序,负数升序排序
查看>>
MySQL 树形结构 根据指定节点 获取其下属的所有子节点(包含路径上的枝干节点和叶子节点)...
查看>>
mysql 死锁 Deadlock found when trying to get lock; try restarting transaction
查看>>
mysql 死锁(先delete 后insert)日志分析
查看>>
MySQL 死锁了,怎么办?
查看>>
MySQL 深度分页性能急剧下降,该如何优化?
查看>>
MySQL 深度分页性能急剧下降,该如何优化?
查看>>
MySQL 添加列,修改列,删除列
查看>>
mysql 添加索引
查看>>
MySQL 添加索引,删除索引及其用法
查看>>
mysql 状态检查,备份,修复
查看>>
MySQL 用 limit 为什么会影响性能?
查看>>