已阅读5页,还剩40页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
IntroductionofCurrentDeepLearningSoftwarePackages,ThreePopularones,1.Caffe/2.Theano/pypi/Theano3.TensorFlow/Thesewebsitesprovideinformationabouthowtoinstallandrunrelateddeeplearningsoftware.,1.Caffe,1.Overview:Caffe(ConvolutionalArchitectureForFeatureExtraction)CreatedbyYangqingJia(贾扬清),UCBerkeley.WritteninC+,hasPythonandMATLABinterface.2.Githubpage:,4.Installmethod(CUDA+Caffe):Ouxinyu.github.io/Blogs/2014723001.html,AnatomyofCaffe,Blob:StoresdataandderivativesLayer:TransformsBottomblobstotopblobsNet:Manylayers;computesgradientsviaforward/backward,Blob,Layer,Net,Blob,ABlobisawrapperovertheactualdatabeingprocessedandpassedalongbyCaffe,andalsounderthehoodprovidessynchronizationcapabilitybetweentheCPUandtheGPU.,Theconventionalblobdimensionsforbatchesofimagedataare(numberN)x(channelK)x(heightH)x(widthW).,Foraconvolutionlayerwith96filtersof11x11spatialdimensionand3inputstheblobis96x3x11x11.Foraninnerproduct/fully-connectedlayerwith1000outputchannelsand1024inputchannelstheparameterblobis1000 x1024.,Layer,Thelayeristheessenceofamodelandthefundamentalunitofcomputation.Layersconvolvefilters,pool,takeinnerproducts,applynonlinearitieslikerectified-linearandsigmoidandotherelement-wisetransformations,normalize,loaddata,andcomputelosseslikesoftmaxandhinge.,Case:ConvolutionLayer,Net,Thenetjointlydefinesafunctionanditsgradientbycompositionandauto-differentiation.Thecompositionofeverylayersoutputcomputesthefunctiontodoagiventask,andthecompositionofeverylayersbackwardcomputesthegradientfromthelosstolearnthetask.,name:LogReglayername:mnisttype:Datatop:datatop:labeldata_paramsource:input_leveldbbatch_size:64layername:iptype:InnerProductbottom:datatop:ipinner_product_paramnum_output:2layername:losstype:SoftmaxWithLossbottom:ipbottom:labeltop:loss,HowtouseCaffe?,Just4steps!1.Convertdata(runascript)2.Definenet(editprototxt)3.Definesolver(editprototxt)4.Train(withpretrainedweights)(runascript)TakeCifar10imageclassificationforexample.,DataLayerreadingfromLMDBistheeasiest,createLMDBusingconvert_imagesetNeedtextfilewhereeachlineis“path/to/image.jpeglabel”(useimageDataLayerread)CreateHDF5fileyourselfusingh5py(useHDF5Layerread),Step1:ConvertDataforCaffe,ConvertDataonCIFAR10,Step2:DefineNet(cifar10_quick_train_totxt),Layername,Blobsname,Learningrateofweight,Learningrateofbias,Inputimagenumperiteration,Trainingimagedata,Datatype,Blobsname,Numberofoutputclass,Outputaccuracyduringtest,Outputlossduringtrain,Ifyoufinetunesomepre-trainmodel,youcansetlr_mul=0,Step2:DefineNet(cifar10_quick_train_totxt),VisualizetheDefinedNetwork,http:/ethereon.github.io/netscope/#/editor,Step3:DefineSolver(cifar10_quick_totxt),#reducethelearningrateafter8epochs(4000iters)byafactorof10#Thetrain/testnetprotocolbufferdefinitionnet:examples/cifar10/cifar10_quick_train_totxt“#test_iterspecifieshowmanyforwardpassesthetestshouldcarryout.#InthecaseofMNIST,wehavetestbatchsize100and100testiterations,#coveringthefull10,000testingimages.test_iter:100#Carryouttestingevery500trainingiterations.test_interval:500#Thebaselearningrate,momentumandtheweightdecayofthenetwork.base_lr:0.001momentum:0.9weight_decay:0.004#Thelearningratepolicylr_policy:fixed“#Displayevery100iterationsdisplay:100#Themaximumnumberofiterationsmax_iter:4000#snapshotintermediateresultssnapshot:4000snapshot_prefix:examples/cifar10/cifar10_quick“#solvermode:CPUorGPUsolver_mode:GPU,DefinedNetfile,Keyparameters,Importantparameters,Step4:Train,Writeashellfile(train_quick.sh):,Thenenjoyacupofcaffe,ModelZoo(Pre-trainedModel+Finetune),Wecanfinetunethesemodelsordofeatureextractionbasedonthesemodels,Sometricks/skillsabouttrainingCaffe,1NeuralNetworks:tricksofthetrade,1.DataAugmentationtoenlargetrainingsamples2.ImagePre-Processing3.NetworkInitializations4.DuringTraining5.ActivationFunctions6.Regularizationsmoredetailscanreferto1,2,2,DataAugmentation,DataAugmentation,Veryusefulforfaceandcarrecognition!,DataAugmentation,Togetridofocclusionandscalechange,likevisualtracking,DataAugmentation,DataAugmentation,ImagePre-Processing,Step1:subtractthedataset-meanvalueineachchannel,Step2:swapchannelsfromRGBtoBGR,Step3:moveimagechannelstooutermostdimension,Step4:rescalefrom0,1to0,255,NetworkInitializations,DuringTraining,helpalleviateoverfittingduringtraininginCaffe,1Srivastava,Nitish,etal.Dropout:asimplewaytopreventneuralnetworksfromoverfitting.JournalofMachineLearningResearch15.1(2014):1929-1958.2S.IoffeandC.Szegedy.Batchnormalization:Acceleratingdeepnetworktrainingbyreducinginternalcovariateshift.arXivpreprintarXiv:1502.03167,2015,Overfitting,ProsandConsofCaffe,ApracticalexampleofCaffe,ObjectdetectionRCNN/Fast-RCNN/Faster-RCNNCaffe+MATLAB,lr=0.1xbaselearningrate,lr=baselearningrate,2.Theano,1.Overview:APythonlibrarythatallowstodefine,optimizeandevaluatemathematicalexpression.FromYoshuaBengiosgroupatUniversityofMontreal.Embracingcomputationgraphs,symboliccomputation.High-levelwrappers:Keras,Lasagne.2.Github:,ProsandConsofTheano,3.TensorFlow,1.Overview:VerysimilartoTheano-allaboutcomputationgraphs.Easyvisualizations(TensorBoard).Multi-GPUandmulti-nodetraining.2.Tutorial:http:/terryum.io/ml_practice/2016/05/28/TFIntroSlides/,LoaddataDefinetheNNstructureSetoptimizationparametersRun!,BasicFlowofTensorFlow,1.Loaddata,1.Loaddata,2.DefinetheNNstructure,3.Setoptimizationparameters,4.RUN,TheProsandConsofTensorFlow,Ove
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 厦门市中医院儿科影像诊断考核
- 池州市人民医院131碘治疗甲癌准入考核
- 三明市中医院复合手术室操作考核
- 景德镇市人民医院上颈椎损伤后路复位固定术资格认证
- 常州市中医院对比剂使用规范考核
- 宜春市中医院医疗核心制度执行监督考核
- 2025餐饮业特许经营合同范本
- 2025酒店服务业员工劳动合同
- 新余市中医院结肠镜单人操作法准入考核与并发症处理试题
- 镇江市中医院骨肿瘤介入治疗考核
- 会所股权转让合同范本
- 人防项目风险管理与控制方案
- 新二上语文课内句子仿写晨读单
- 2024年苏州市中小学教师专业素养竞赛模拟试卷
- GB/T 21449-2008水-乙二醇型难燃液压液
- 乙炔安全技术说明书MSDS
- GA/T 453.2-2021居民身份证冲切技术规范第2部分:冲切设备技术要求
- 医药代表地区经理竞聘ppt模板
- 国电南自110kv主变保护pst671u型调试手册
- 2021年5月CCAA审核员考试《认证通用基础》真题及答案
- 中药炮制全部试题
评论
0/150
提交评论