资源预览内容
第1页 / 共66页
第2页 / 共66页
第3页 / 共66页
第4页 / 共66页
第5页 / 共66页
第6页 / 共66页
第7页 / 共66页
第8页 / 共66页
第9页 / 共66页
第10页 / 共66页
亲,该文档总共66页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
PyTorchTorch TensorFlowCaffe TheanoMXNet Deep Learning Platforms for Deep Learning Outline Introduction Experiment Pipeline in Caffe Deeper into Caffe Python Interface Define Custom Layers Introduction What is Caffe Convolution Architecture For Feature Extraction CAFFE Open framework models and worked examples for deep learning 600 citations 200 contributions 18K stars 11K forks focus on vision but branching out sequences reinforcement learning speech text What is Caffe Pure C CUDA architecture for deep learning command line Python Matlab interfaces Fast well tested code Tools reference models demos and recipes Seamless switch between CPU and GPU Caffe set model Caffe GPU Official Websites Home page http caffe berkeleyvision org GitHub Installation http caffe berkeleyvision org installation html Step by step Instructions Docker setup out of the box brewing Ubuntu installation the standard platform Debian installation install caffe with a single command OS X installation RHEL CentOS Fedora installation Windows see the Windows branch led by Guillaume Dumont OpenCL see the OpenCL branch led by Fabian Tschopp AWS AMI pre configured for AWS Overview Prerequisites Compilation Hardware Windows Linux http caffe berkeleyvision org install apt html General dependencies sudo apt get install libprotobuf dev libleveldb dev libsnappy dev libopencv dev libhdf5 serial dev protobuf compiler sudo apt get install no install recommends libboost all dev CUDA BLAS Python Compilation with Make Experiment Pipeline in Caffe Architecture of Caffe Main classes blob store data and derivatives layers transforms bottom blobs to top blobs net consists of many layers computes gradients via forward backward solver uses gradients to update weights Architecture of Caffe Main files train test prototxt deploy prototxt descript structure of the network solver prototxt descript training parameters create train test prototxt create solver prototxt TrainingTesting Define Network Step 1 create a train test prototxt layer name data type Data top data top label include phase TRAIN transform param mirror true crop size 28 mean file home data cifar10 cifar10 mean binaryproto data param source home data cifar10 cifar10 train lmdb batch size 128 backend LMDB layer name conv 1 type Convolution bottom data top conv 1 param lr mult 1 0 decay mult 1 0 convolution param num output 16 pad 1 kernel size 3 stride 1 weight filler type gaussian std 0 117851130198 bias filler type constant value 0 0 layer name loss type SoftmaxWithLoss bottom fc10 bottom label top loss DataLayersLoss Define Training Parameters Step 2 create solver prototxt train net train test prototxt base lr 0 01 momentum 0 9 weight decay 0 0001 max iter 10000 snapshot prefix snapshot other options 1 L Wt 1 1 Details on SGD parameters MomentumLRDecay Training Step 3 training and testing build tools caffe train solver solver prototxt gpu 0 commandattributesvalues Deeper into Caffe prototxt Protocol buffers Like strongly typed binary JSON Developed by Google Define message types in proto file Define messages in prototxt or binaryproto files Caffe also uses caffemodel All Caffe messages defined in caffe proto train test prototxt deploy prototxt descript structure of the network solver prototxt descript training parameters Layers http caffe berkeleyvision org tutorial layers html Data layers Image data read raw images Database read data from LEVELDB or LMDB Vision layers Convolutional layer convolves the input image learnable filters each producing one feature map in the output image Pooling layer max average or stochastic pooling Common layers Inner product fully connected layer Normalization layers Batch Normalization performs normalization Database Layer get definition from src caffe proto caffe proto data source batch size backend of database mean file crop size mirror transform param Data Layer layer name data type Data top data top label include phase TRAIN transform param mirror true crop size 28 mean file home data cifar10 cifar10 mean binaryproto data param source home data cifar10 cifar10 train lmdb batch size 128 backend LMDB common parameters Layer name layer name top layers this layer only used for training data preprocessing data path batch size and file format Convolutional Layer http caffe berkeleyvision org tutorial layers convolution html layer name conv1 type Convolution bottom data top conv1 learning rate and decay multipliers for the filters param lr mult 1 decay mult 1 learning rate and decay multipliers for the biases param lr mult 2 decay mult 0 convolution param num output 96 learn 96 filters kernel size 11 each filter is 11x11 stride 4 step 4 pixels between each filter application weight filler type gaussian initialize the filters from a Gaussian std 0 01 distribution with stdev 0 01 default mean 0 bias filler type constant initialize the biases to zero 0 value 0 More Layers Batch normalization layer name batchNorm 1 type BatchNorm bottom conv 1 top conv 1 batch norm param S
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号