版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
IntroductiontoDeepLearningHuihuiLiuMar.1,2023OutlineConceptionofdeeplearningDevelopmenthistoryDeeplearningframeworksDeepneuralnetworkarchitecturesConvolutionalneuralnetworks
IntroductionNetworkstructureTrainingtricksApplicationinAestheticImageEvaluationIdea
DeepLearning(Hinton,2006)Deeplearningisabranchofmachinelearningbasedonasetofalgorithmsthatattempttomodelhighlevelabstractionsindata.Theadvantageofdeeplearningistoextractingfeaturesautomatically
insteadofextractingfeaturesmanually.ComputervisionSpeechrecognitionNaturallanguageprocessingDevelopmentHistory194319401950196019701980199020002023MPmodel1958Single-layerPerceptron1969XORproblem1986BPalgorithm1989CNN-LeNet19951997SVMLSTMGradientdisappearanceproblem19912006DBNReLU202320232023DropoutAlexNetBNFasterR-CNNResidualNetGeoffreyHintonW.S.McCullochW.PittsRosenblattMarvinMinskyYannLeCunHintonHintonHintonLeCunBengioDeepLearningFrameworksDeepneuralnetworkarchitecturesDeepBeliefNetworks(DBN)RecurrentNeuralNetworks(RNN)GenerativeAdversarialNetworks(GANs)ConvolutionalNeuralNetworks(CNN)LongShort-TermMemory(LSTM)DBN(DeepBeliefNetwork,2006)Hiddenunitsandvisibleunits
Eachunitisbinary(0or1).
Everyvisibleunitconnectstoallthehiddenunits.
Everyhiddenunitconnectstoallthevisibleunits.
Therearenoconnectionsbetweenv-vandh-h.HintonGE.Deepbeliefnetworks[J].Scholarpedia,2023,4(6):5947.Fig1.RBM(restrictedBoltzmannmachine)structure.Fig2.DBN(deepbeliefnetwork)structure.Idea?ComposedofmultiplelayersofRBM.Howtowetraintheseadditionallayers?
UnsupervisedgreedyapproachRNN(RecurrentNeuralNetwork,2023)What?RNNaimstoprocessthesequencedata.RNNwillrememberthepreviousinformationandapplyittothecalculationofthecurrentoutput.Thatis,thenodesofthehiddenlayerareconnected,andtheinputofthehiddenlayerincludesnotonlytheoutputoftheinputlayerbutalsotheoutputofthehiddenlayer.MarhonSA,CameronCJF,KremerSC.RecurrentNeuralNetworks[M]//HandbookonNeuralInformationProcessing.SpringerBerlinHeidelberg,2023:29-65.Applications?MachineTranslationGeneratingImageDescriptionsSpeechRecognitionHowtotrain?
BPTT(Backpropagationthroughtime)GANs(GenerativeAdversarialNetworks,2023)GANsInspiredbyzero-sumGameinGameTheory,whichconsistsofapairofnetworks-ageneratornetworkandadiscriminatornetwork.Thegeneratornetworkgeneratesasamplefromtherandomvector,thediscriminatornetworkdiscriminateswhetheragivensampleisnaturalorcounterfeit.Bothnetworkstraintogethertoimprovetheirperformanceuntiltheyreachapointwherecounterfeitandrealsamplescannotbedistinguished.GoodfellowI,Pouget-AbadieJ,MirzaM,etal.Generativeadversarialnets[C]//Advancesinneuralinformationprocessingsystems.2023:2672-2680.Applacations:ImageeditingImagetoimagetranslationGeneratetextGenerateimagesbasedontextCombinedwithreinforcementlearningAndmore…LongShort-TermMemory(LSTM,1997)NeuralNetworksNeuronNeuralnetworkConvolutionalNeuralNetworks(CNN)Convolutionneuralnetworkisakindoffeedforwardneuralnetwork,whichhasthecharacteristicsofsimplestructure,lesstrainingparametersandstrongadaptability.CNN
avoids
thecomplexpre-processingofimage(etc.extracttheartificialfeatures),wecandirectlyinput
theoriginalimage.
Basiccomponents:ConvolutionLayers,PoolingLayers,FullyconnectedLayersConvolutionlayerTheconvolutionkerneltranslates
ona2-dimensionalplane,andeachelementoftheconvolutionkernelismultiplied
bytheelementatthecorrespondingpositionoftheconvolutionimageandthensumalltheproduct.Bymovingtheconvolutionkernel,wehaveanewimage,whichconsistsofthesumoftheproductoftheconvolutionkernelateachposition.localreceptivefieldweightsharingReduced
thenumberofparametersPoolinglayerPoolinglayeraimstocompresstheinputfeaturemap,whichcanreducethenumberofparameters
intrainingprocessandthedegreeof
over-fitting
ofthemodel.Max-pooling:Selectingthemaximumvalueinthepoolingwindow.Mean-pooling:Calculatingtheaverageofallvaluesinthepoolingwindow.FullyconnectedlayerandSoftmaxlayerEachnodeofthefullyconnectedlayerisconnectedtoallthenodesofthelastlayer,whichisusedtocombinethefeaturesextractedfromthefrontlayers.Fig1.Fullyconnectedlayer.Fig2.CompleteCNNstructure.Fig3.Softmaxlayer.TrainingandTestingForwardpropagation-Takingasample(X,Yp)fromthesamplesetandputtheXintothenetwork;-CalculatingthecorrespondingactualoutputOp.Backpropagation-CalculatingthedifferencebetweentheactualoutputOpandthecorrespondingidealoutputYp;-Adjustingtheweightmatrixbyminimizingtheerror.Trainingstage:Testingstage:Puttingdifferentimagesandlabelsintothetrainedconvolutionneuralnetworkandcomparingtheoutputandtheactualvalueofthesample.Beforethetrainingstage,weshouldusesomedifferentsmallrandomnumberstoinitializeweights.CNNStructureEvolutionHintonBPNeocognitionLeCunLeNetAlexNetHistoricalbreakthroughReLUDropoutGPU+BigDataVGG16VGG19MSRA-NetDeepernetworkNINGoogLeNetInceptionV3InceptionV4R-CNNSPP-NetFastR-CNNFasterR-CNNInceptionV2(BN)FCNFCN+CRFSTNetCNN+RNN/LSTMResNetEnhancedthefunctionalityoftheconvolutionmoduleClassificationtaskDetectiontaskAdd
newfunctionalunitintegration19801998198920232023ImageNetILSVRC(ImageNetLargeScaleVisualRecognitionChallenge)20232023202320232023,2023202320232023BN(BatchNormalization)RPNLeNet(LeCun,1998)LeNet
isaconvolutionalneuralnetworkdesignedbyYannLeCunforhandwrittennumeralrecognitionin1998.Itisoneofthemostrepresentativeexperimentalsystemsinearlyconvolutionalneuralnetworks.LeNetincludestheconvolutionlayer,poolinglayer
andfull-connectedlayer,whicharethebasiccomponentsofmodernCNNnetwork.LeNetisconsideredtobethebeginningoftheCNN.networkstructure:3convolutionlayers+2poolinglayers+1fullyconnectedlayer+1outputlayerHaykinS,KoskoB.GradientBasedLearningAppliedtoDocumentRecognition[D].Wiley-IEEEPress,2023.AlexNet(Alex,2023)Networkstructure:5convolutionlayers+3fullyconnectedlayersThenonlinearactivationfunction:ReLU(Rectifiedlinearunit)Methodstopreventoverfitting:Dropout,DataAugmentationBigDataTraining:ImageNet--imagedatabaseofmillionordersofmagnitudeOthers:GPU,LRN(localresponsenormalization)layerKrizhevskyA,SutskeverI,HintonGE.ImageNetclassificationwithdeepconvolutionalneuralnetworks[C]//InternationalConferenceonNeuralInformationProcessingSystems.CurranAssociatesInc.2023:1097-1105.Overfeat(2023)SermanetP,EigenD,ZhangX,etal.OverFeat:IntegratedRecognition,LocalizationandDetectionusingConvolutionalNetworks[J].EprintArxiv,2023.VGG-Net(OxfordUniversity,2023)input:afixed-size224*224RGBimagefilters:averysmallreceptivefield--3*3,withstride1Max-pooling:2*2pixelwindow,withstride2Fig1.ArchitectureofVGG16Table1:ConvNetconfigurations(shownincolumns).Theconvolutionallayerparametersaredenotedas“conv<receptivefieldsize>-<numberofchannels>〞SimonyanK,ZissermanA.VeryDeepConvolutionalNetworksforLarge-ScaleImageRecognition[J].ComputerScience,2023.Why3*3filters?Stackedconv.layershavealargereceptivefieldMorenon-linearityLessparameterstolearnNetwork-in-Network(NIN,ShuichengYan,2023)Networkstructure:4Mlpconvlayers+GlobalaveragepoolinglayerFig1.linearconvolution
MLPconvolutionFig2.fullyconnectedlayer
globalaveragepoolinglayerMinLinetal,NetworkinNetwork,Arxiv2023.Fig3.NINstructureLinearcombinationofmultiplefeaturemaps.Informationintegrationofcross-channel.ReducedtheparametersReducedthenetworkAvoidedover-fittingGoogLeNet(InceptionV1,2023)Fig1.Inceptionmodule,na?veversionProposedinceptionarchitectureandoptimizeditCanceled
thefullyconnnectedlayerUsedauxiliaryclassifierstoacceleratenetworkconvergenceSzegedyC,LiuW,JiaY,etal.Goingdeeperwithconvolutions[C]//ProceedingsoftheIEEEConferenceonComputerVisionandPatternRecognition.2023:1-9.Fig2.InceptionmodulewithdimensionreductionsFig3.GoogLeNetnetwork(22layers)InceptionV2(2023)IoffeS,SzegedyC.Batchnormalization:Acceleratingdeepnetworktrainingbyreducinginternalcovariateshift[J].arXivpreprintarXiv:1502.03167,2023.InceptionV3(2023)SzegedyC,VanhouckeV,IoffeS,etal.Rethinkingtheinceptionarchitectureforcomputervision[C]//ProceedingsoftheIEEEConferenceonComputerVisionandPatternRecognition.2023:2818-2826.ResNet(KaiwenHe,2023)Asimpleandcleanframeworkoftraining“very〞deepnetworks.State-of-the-artperformanceforImageclassificationObjectdetectionSemanticSegmentationandmoreHeK,ZhangX,RenS,etal.DeepResidualLearningforImageRecognition[J].2023:770-778.Fig1.ShortcutconnectionsFig2.ResNetstructure(152layers)FractalNetInceptionV4(2023)SzegedyC,IoffeS,VanhouckeV,etal.Inception-v4,inception-resnetandtheimpactofresidualconnectionsonlearning[J].arXivpreprintarXiv:1602.07261,2023.Inception-ResNetHeK,ZhangX,RenS,etal.DeepResidualLearningforImageRecognition[J].2023:770-778.ComparisonSqueezeNet
SqueezeNet:AlexNet-levelaccuracywith50xfewerparametersand<0.5MBmodelsizeXceptionR-CNN(2023)Regionproposals:SelectiveSearch
Resizetheregionproposal:Warpallregionproposalstotherequiredsize(227*227,
AlexNetInput)
ComputeCNNfeature:Extracta4096-dimensionalfeaturevectorfromeachregionproposalusingAlexNet.
Classify:TrainingalinearSVMclassifierforeachclass.[1]UijlingsJRR,SandeKEAVD,GeversT,etal.SelectiveSearchforObjectRecognition[J].InternationalJournalofComputerVision,2023,104(2):154-171.[2]GirshickR,DonahueJ,DarrellT,etal.RichFeatureHierarchiesforAccurateObjectDetectionandSemanticSegmentation[J].2023:580-587.R-CNN:Regionproposals+CNNSPP-Net(Spatialpyramidpoolingnetwork,2023)HeK,ZhangX,RenS,etal.SpatialPyramidPoolinginDeepConvolutionalNetworksforVisualRecognition[J].IEEETransactionsonPatternAnalysis&MachineIntelligence,2023,37(9):1904-1916.Fig2.Anetworkstructurewithaspatialpyramidpoolinglayer.Fig1.Top:AconventionalCNN.Bottom:Spatialpyramidpoolingnetworkstructure.Advantages:Getthefeaturemapoftheentireimagetosavemuchtime.Outputafixedlengthfeaturevectorwithinputsofarbitrarysizes.Extractthefeatureofdifferentscale,andcanexpressmorespatialinformation.TheSPP-Netmethodcomputesaconvolutionalfeaturemapfortheentireinputimageandthenclassifieseachobjectproposalusingafeaturevectorextractedfromthesharedfeaturemap.FastR-CNN(2023)AFastR-CNNnetworktakesanentireimageandasetofobjectproposalsasinput.Thenetworkprocessestheentireimagewithseveralconvolutional(conv)andmaxpoolinglayerstoproduceaconvfeaturemap.Foreachobjectproposal,aregionofinterest(RoI)poolinglayerextractsafixed-lengthfeaturevectorfromthefeaturemap.Eachfeaturevectorisfedintoasequenceoffullyconnectedlayersthatfinallybranchintotwosiblingoutputlayers.
GirshickR.Fastr-cnn[C]//ProceedingsoftheIEEEInternationalConferenceonComputerVision.2023:1440-1448.FasterR-CNN(2023)FasterR-CNN=RPN+FastR-CNN
ARegionProposalNetwork(RPN)takesanimage(ofanysize)asinputandoutputsasetofrectangularobjectproposals,eachwithanobjectnessscore.
RenS,HeK,GirshickR,etal.Fasterr-cnn:Towardsreal-timeobjectdetectionwithregionproposalnetworks[C]//Advancesinneuralinformationprocessingsystems.2023:91-99.Figure1.FasterR-CNNisasingle,unifiednetworkforobjectdetection.Figure2.RegionProposalNetwork(RPN).TrainingtricksDataAugmentationDropoutReLUBatchNormalizationDataAugmentation-rotation-flip-zoom-shift-scale-contrast-noisedisturbance-color-...Dropout(2023)Dropoutconsistsofsettingtozerotheoutputofeachhiddenneuronwithprobabilityp.Theneuronswhichare“droppedout〞inthiswaydonotcontributetotheforwardbackpropagationanddonotparticipateinbackpropagation.ReLU(RectifiedLinearUnit)
advantagesrectifiedSimplifiedcalculationAvoidedgradientdisappearedBatchNormalization(2023)Intheinputofeachlayerofthenetwork,insertanormalizedlayer.Foralayerwithd-dimensionalinputx=(x(1)...x(d)),wewillnormalizeeachdimension:IoffeS,SzegedyC.Batchnormalization:Acceleratingdeepnetworktrainingbyreducinginternalcovariateshift[J].arXivpreprintarXiv:1502.03167,2023.Internal
Covariate
Shift
ApplicationinAestheticImageEvaluationDongZ,ShenX,LiH,etal.PhotoQualityAssessmentwithDCNNthatUnderstandsImageWell[M]//MultiMediaModeling.SpringerInternationalPublishing,2023:524-535.LuX,LinZ,JinH,etal.Ratingimageaestheticsusingdeeplearning[J].IEEETransactionsonMultimedia,2023,17(11):2021-2034.WangW,ZhaoM,WangL,etal.Amulti-scenedeeplearningmodelforimageaestheticevaluation[J].SignalProcessingImageCommunication,2023,47:511-518.PhotoQualityAssessmentwithDCNNthatUnderstandsImageWellDCNN_Aesthtrainedwellnetworkatwo-classSVMclassifierDCNN_Aesth_SPoriginalimagessegmentedimagesspatialpyramidImageNetCUHKAVADongZ,ShenX,LiH,etal.PhotoQualityAssessmentwithDCNNthatUnderstandsImageWell[M]//MultiMediaModeling.SpringerInternationalPublishing,2023:524-535.RatingimageaestheticsusingdeeplearningSupportheterogeneousinputs,i.e.,globaland
localviews.AllparametersinDCNNarejointlytrained.Fig1.GlobalviewsandlocalviewsofanimageFig3.DCNNarchitectureFig2.SCNNarchitecture
SCNNDCNN
Enablesthenetworktojudgeimageaestheticswhilesimultaneouslyconsideringboththeglobalandlocalviewsofanimage.LuX,LinZ,JinH,etal.Ratingimageaestheticsusingdeeplearning[J].IEEETransactionsonMultimedia,2023,17(11):2021-2034.Amulti-scenedeeplearningmodelforimageaestheticevaluationDesignasceneconvolutionallayerconsistofmulti-groupdescriptorsinthenetwork.Designapre-trainingproceduretoinitializeourmodel.Fig1.Thearchitectureofthemulti-scenedeeplearningmodel(MSDLM).Fig2.TheoverviewofproposedMSDLM.ArchitectureofMSDLM:4
convolutionallayers+1sceneconvolutionallayer+3fullyconnectedlayersWangW,ZhaoM,WangL,etal.Amulti-scenedeeplearningmodelforimageaestheticevaluation[J].SignalProcessingImageCommunication,2023,47:511-518.Example-Loadthedatasetdefload_dataset():url=':///data/mnist/mnist.pkl.gz'filename='E:/DeepLearning_Library/mnist.pkl.gz'ifnotos.path.exists(filename):print("DownloadingMNISTdataset...")urlretrieve(url,filename)withgzip.open(filename,'rb')asf:data=pickle.load(f)X_train,y_train=data[0]X_val,y_val=data[1]X_test,y_test=data[2]X_train=X_train.reshape((-1,1,28,28))X_val=X_val.reshape((-1,1,28,28))X_test=X_test.reshape((-1,1,28,28))y_train=y_train.astype(np.uint8)y_val=y_val.astype(np.uint8)y_test=y_test.astype(np.uint8)returnX_train,y_train,X_val,y_val,X_test,y_test
X_train,y_train,X_val,y_val,X_test,y_test=load_dataset()plt.imshow(X_train[0][0],cmap=cm.binary)Example–Modelnet1=NeuralNet(layers=[('input',layers.InputLayer),
('conv2d1',
layers.Conv2DLayer),
('maxpool1',
layers.MaxPool2DLayer),
('conv2d2',layers.Conv2DLayer),
('maxpool2',layers.MaxPool2DLayer),
('dropout1',layers.DropoutLayer),
('dense',layers.DenseLayer),
('dropout2',layers.DropoutLayer),
('output',layers.DenseLayer),
],
#inputlayerinput_shape=(None,1,28,28),#layerconv2d1conv2d1_num_filters=32,conv2d1_filter_size=(5,5),
conv2d1_nonlinearity=lasagne.nonlinearities.rectify,conv2d1_W=lasagne.init.GlorotUniform(),
#layermaxpool1maxpool1_pool_size=(2,2),#layerconv2d2conv2d2_num_filters=32,conv2d2_filter_size=(5,5),conv2d2_nonlinearity=lasagne.nonlinearities.rectify,
#layermaxpool2maxpool2_pool_size=(2,2),
#dropout1dropout1_p=0.5,
#densei.e.full-connectedlayerdense_num_units=256,dense_nonlinearity=lasagne.nonlinearities.rectify,
#dropout2dropout2_p=0.5,
#outputoutput_nonlinearity=lasagne.nonlinearities.softmax,output_num_units=10,
#optimizationmethodparamsupdate=nesterov_momentum,update_learning_rate=0.01,update_momentum=
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 上海視覺藝術(shù)學(xué)院《專業(yè)綜合實(shí)訓(xùn)(通信工程)》2023-2024學(xué)年第一學(xué)期期末試卷
- 上海師范大學(xué)天華學(xué)院《工商管理綜合實(shí)訓(xùn)》2023-2024學(xué)年第一學(xué)期期末試卷
- 2025勞動(dòng)合同船長
- 上海師范大學(xué)《互聯(lián)網(wǎng)思維》2023-2024學(xué)年第一學(xué)期期末試卷
- 上海師范大學(xué)《二十世紀(jì)中國史學(xué)》2023-2024學(xué)年第一學(xué)期期末試卷
- 2025未經(jīng)登記的房產(chǎn)抵押合同無效
- 競聘報(bào)告 范文
- 課題申報(bào)書:共享微出行騎行空間對(duì)城市居民心理健康恢復(fù)的要素識(shí)別、作用機(jī)制與循證研究
- 課題申報(bào)書:工業(yè)化與人力資本積累-基于三線建設(shè)的研究
- 課題申報(bào)書:個(gè)體衰老差異視角下社區(qū)交往空間特征識(shí)別與優(yōu)化
- 2024年執(zhí)業(yè)藥師繼續(xù)教育專業(yè)答案
- 非ST段抬高型急性冠脈綜合征診斷和治療指南(2024)解讀
- 口腔診所傳染病預(yù)防措施
- 刑事訴訟法學(xué)(湘潭大學(xué))智慧樹知到期末考試答案2024年
- 教師語言與溝通藝術(shù)智慧樹知到期末考試答案2024年
- 北京市西城區(qū)2023-2024學(xué)年五年級(jí)上學(xué)期期末數(shù)學(xué)試卷
- 龍泉街道文化產(chǎn)業(yè)及民族民俗文化發(fā)展工作匯報(bào)
- 壓力容器壁厚計(jì)算表
- Y-△降壓啟動(dòng)控制線路ppt課件
- 制作同軸電纜接頭的方法課件
- 完整版鋼箱梁安裝及疊合梁施工
評(píng)論
0/150
提交評(píng)論