Pete Warden, Daniel Situnayake - TinyML_ Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers-O'Reilly Media (2019).pdf
- 文档编号:30839042
- 上传时间:2024-01-30
- 格式:PDF
- 页数:504
- 大小:23.43MB
Pete Warden, Daniel Situnayake - TinyML_ Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers-O'Reilly Media (2019).pdf
《Pete Warden, Daniel Situnayake - TinyML_ Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers-O'Reilly Media (2019).pdf》由会员分享,可在线阅读,更多相关《Pete Warden, Daniel Situnayake - TinyML_ Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers-O'Reilly Media (2019).pdf(504页珍藏版)》请在冰豆网上搜索。
PeteWarden&DanielSitunayakeTinyMLMachineLearningwithTensorFlowLiteonArduinoandUltra-Low-PowerMicrocontrollersPeteWardenandDanielSitunayakeTinyMLMachineLearningwithTensorFlowLiteonArduinoandUltra-Low-PowerMicrocontrollersBostonFarnhamSebastopolTokyoBeijingBostonFarnhamSebastopolTokyoBeijing978-1-492-05204-3LSITinyMLbyPeteWardenandDanielSitunayakeCopyright2020PeteWardenandDanielSitunayake.Allrightsreserved.PrintedintheUnitedStatesofAmerica.PublishedbyOReillyMedia,Inc.,1005GravensteinHighwayNorth,Sebastopol,CA95472.OReillybooksmaybepurchasedforeducational,business,orsalespromotionaluse.Onlineeditionsarealsoavailableformosttitles(http:
/).Formoreinformation,contactourcorporate/institutionalsalesdepartment:
800-998-9938or.AcquisitionsEditor:
MikeLoukidesDevelopmentEditor:
NicoleTachProductionEditor:
BethKellyCopyeditor:
OctalPublishing,Inc.Proofreader:
RachelHeadIndexer:
WordCo,Inc.InteriorDesigner:
DavidFutatoIllustrator:
RebeccaDemarestDecember2019:
FirstEditionRevisionHistoryfortheFirstEdition2019-12-13:
FirstReleaseSeehttp:
/forreleasedetails.TheOReillylogoisaregisteredtrademarkofOReillyMedia,Inc.TinyML,thecoverimage,andrelatedtradedressaretrademarksofOReillyMedia,Inc.TinyMLisatrademarkofthetinyMLFoundationandisusedwithpermission.Whilethepublisherandtheauthorshaveusedgoodfaitheffortstoensurethattheinformationandinstructionscontainedinthisworkareaccurate,thepublisherandtheauthorsdisclaimallresponsibilityforerrorsoromissions,includingwithoutlimitationresponsibilityfordamagesresultingfromtheuseoforrelianceonthiswork.Useoftheinformationandinstructionscontainedinthisworkisatyourownrisk.Ifanycodesamplesorothertechnologythisworkcontainsordescribesissubjecttoopensourcelicensesortheintellectualpropertyrightsofothers,itisyourresponsibilitytoensurethatyourusethereofcomplieswithsuchlicensesand/orrights.TableofContentsPreface.xiii1.Introduction.1EmbeddedDevices3ChangingLandscape42.GettingStarted.5WhoIsThisBookAimedAt?
5WhatHardwareDoYouNeed?
6WhatSoftwareDoYouNeed?
7WhatDoWeHopeYoullLearn?
83.GettingUptoSpeedonMachineLearning.11WhatMachineLearningActuallyIs12TheDeepLearningWorkflow13DecideonaGoal14CollectaDataset14DesignaModelArchitecture16TraintheModel21ConverttheModel26RunInference26EvaluateandTroubleshoot27WrappingUp284.The“HelloWorld”ofTinyML:
BuildingandTrainingaModel.29WhatWereBuilding30OurMachineLearningToolchain32PythonandJupyterNotebooks32iiiGoogleColaboratory33TensorFlowandKeras33BuildingOurModel34ImportingDependencies35GeneratingData38SplittingtheData41DefiningaBasicModel42TrainingOurModel46TrainingMetrics48GraphingtheHistory49ImprovingOurModel54Testing58ConvertingtheModelforTensorFlowLite60ConvertingtoaCFile64WrappingUp655.The“HelloWorld”ofTinyML:
BuildinganApplication.67WalkingThroughtheTests68IncludingDependencies69SettingUptheTest70GettingReadytoLogData70MappingOurModel72CreatinganAllOpsResolver74DefiningaTensorArena74CreatinganInterpreter75InspectingtheInputTensor75RunningInferenceonanInput78ReadingtheOutput80RunningtheTests82ProjectFileStructure85WalkingThroughtheSource86Startingwithmain_functions.cc87HandlingOutputwithoutput_handler.cc90WrappingUpmain_functions.cc91Understandingmain.cc91RunningOurApplication92WrappingUp936.The“HelloWorld”ofTinyML:
DeployingtoMicrocontrollers.95WhatExactlyIsaMicrocontroller?
96Arduino97HandlingOutputonArduino98iv|TableofContentsRunningtheExample101MakingYourOwnChanges106SparkFunEdge106HandlingOutputonSparkFunEdge107RunningtheExample110TestingtheProgram117ViewingDebugData118MakingYourOwnChanges118STMicroelectronicsSTM32F746GDiscoveryKit119HandlingOutputonSTM32F746G119RunningtheExample124MakingYourOwnChanges126WrappingUp1267.Wake-WordDetection:
BuildinganApplication.127WhatWereBuilding128ApplicationArchitecture129IntroducingOurModel130AlltheMovingParts132WalkingThroughtheTests133TheBasicFlow134TheAudioProvider138TheFeatureProvider139TheCommandRecognizer145TheCommandResponder151ListeningforWakeWords152RunningOurApplication156DeployingtoMicrocontrollers156Arduino157SparkFunEdge165STMicroelectronicsSTM32F746GDiscoveryKit175WrappingUp1808.Wake-WordDetection:
TrainingaModel.181TrainingOurNewModel182TraininginColab182UsingtheModelinOurProject197ReplacingtheModel197UpdatingtheLabels198Updatingcommand_responder.cc198OtherWaystoRuntheScripts201HowtheModelWorks202TableofContents|vVisualizingtheInputs202HowDoesFeatureGenerationWork?
206UnderstandingtheModelArchitecture208UnderstandingtheModelOutput213TrainingwithYourOwnData214TheSpeechCommandsDataset215TrainingonYourOwnDataset216HowtoRecordYourOwnAudio216DataAugmentation218ModelArchitectures218WrappingUp2199.PersonDetection:
BuildinganApplication.221WhatWereBuilding222ApplicationArchitecture224IntroducingOurModel224AlltheMovingParts225WalkingThroughtheTests227TheBasicFlow227TheImageProvider231TheDetectionResponder232DetectingPeople233DeployingtoMicrocontrollers235Arduino236SparkFunEdge246WrappingUp25710.PersonDetection:
TrainingaModel.259PickingaMachine259SettingUpaGoogleCloudPlatformInstance260TrainingFrameworkChoice268BuildingtheDataset269TrainingtheModel270TensorBoard272EvaluatingtheModel274ExportingtheModeltoTensorFlowLite274ExportingtoaGraphDefProtobufFile274FreezingtheWeights275QuantizingandConvertingtoTensorFlowLite275ConvertingtoaCSourceFile276TrainingforOtherCategories277UnderstandingtheArchitecture277vi|TableofContentsWrappingUp27811.MagicWand:
BuildinganApplication.279WhatWereBuilding282ApplicationArchitecture283IntroducingOurModel284AlltheMovingParts284WalkingThroughtheTests285TheBasicFlow286TheAccelerometerHandler289TheGesturePredictor291TheOutputHandler294DetectingGestures295DeployingtoMicrocontrollers298Arduino298SparkFunEdge312WrappingUp32712.MagicWand:
TrainingaModel.329TrainingaModel330TraininginColab330OtherWaystoRuntheScripts339HowtheModelWorks339VisualizingtheInput339UnderstandingtheModelArchitecture342TrainingwithYourOwnData349CapturingData349ModifyingtheTrainingScripts352Training352UsingtheNewModel352WrappingUp353LearningMachineLearning353WhatsNext35413.TensorFlowLiteforMicrocontrollers.355WhatIsTensorFlowLiteforMicrocontrollers?
355TensorFlow355TensorFlowLite356TensorFlowLiteforMicrocontrollers356Requirements357WhyIstheModelInterpreted?
359ProjectGeneration360TableofContents|viiBuildSystems361SpecializingCode362Makefiles366WritingTests369SupportingaNewHardwarePlatform370PrintingtoaLog370ImplementingDebugLog()373RunningAlltheTargets375IntegratingwiththeMakefileBuild375SupportingaNewIDEorBuildSystem376IntegratingCodeChangesBetweenProjectsandRepositories377ContributingBacktoOpenSource379SupportingNewHardwareAccelerators380UnderstandingtheFileFormat381FlatBuffers382PortingTensorFlowLiteMobileOpstoMicro388SeparatetheReferenceCode389CreateaMicroCopyoftheOperator389PorttheTesttotheMicroFramework390BuildaBazelTest390AddYourOptoAllOpsResolver391BuildaMakefileTest391WrappingUp39214.DesigningYourOwnTinyMLApplications.393TheDesignProcess393DoYouNeedaMicrocontroller,orWouldaLargerDeviceWork?
394UnderstandingWhatsPossible395FollowinSomeoneElsesFootsteps395FindSomeSimilarModelstoTrain396LookattheData397WizardofOz-ing398GetItWorkingontheDesktopFirst39915.OptimizingLatency.401FirstMakeSureItMatters401HardwareChanges402ModelImprovements402EstimatingModelLatency403HowtoSpeedUpYourModel404Quantization404ProductDesign406viii|TableofContentsCodeOptimizations407PerformanceProfiling407OptimizingOperations409LookforImplementationsThatAreAlreadyOptimized409WriteYourOwnOptimizedImplementation409TakingAdvantageofHardwareFeatures412AcceleratorsandCoprocessors413ContributingBacktoOpenSource414WrappingUp41416.OptimizingEnergyUsage.415DevelopingIntuition415TypicalComponentPowerUsage416HardwareChoice417MeasuringRealPowerUsage419EstimatingPowerUsageforaModel419ImprovingPowerUsage420DutyCycling420CascadingDesign421WrappingUp42117.OptimizingModelandBinarySize.423UnderstandingYourSystemsLimits423EstimatingMemoryUsage424FlashUsage424RAMUsage425BallparkFiguresforModelAccuracyandSizeonDifferentProblems426SpeechWake-WordModel427AccelerometerPredictiveMaintenanceModel427PersonPresenceDetection427ModelChoice428ReducingtheSizeofYourExecutable428MeasuringCodeSize429HowMuchSpaceIsTensorflowLiteforMicrocontrollersTaking?
429OpResolver430UnderstandingtheSizeofIndividualFunctions431FrameworkConstants434TrulyTinyModels434WrappingUp43518.Debugging.437AccuracyLossBetweenTrainingandDeployment437TableofContents|ixPreprocessingDifferences437DebuggingPreprocessing439On-DeviceEvaluation440NumericalDifferences440AretheDifferencesaProblem?
440EstablishaMetric441CompareAgainstaBaseline441SwapOutImplementations442MysteriousCrashesandHangs442DesktopDebugging443LogTracing443ShotgunDebugging444MemoryCorruption444WrappingUp44519.PortingModelsfromTensorFlowtoTensorFlowLite.447UnderstandWhatOpsAreNeeded447LookatExistingOpCoverageinTensorflowLite448MovePreprocessingandPostprocessingintoApplicationCode449ImplementRequiredOpsifNecessary450Optimize
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Pete Warden Daniel Situnayake TinyML_ Machine Learning with TensorFlow Lite on Arduino and Ultra-Lo
链接地址:https://www.bdocx.com/doc/30839042.html