Install TensorFlow Addons on Jetson Nano - Q-engineering
文章推薦指數: 80 %
TensorFlow Addons give you additional functionality not yet included in the core of TensorFlow. If it has proven useful, a particular Addon merged into the ...
Q-engineering
×
Machinelearning
Computervision
Embeddedvision
Deeplearning
Math
Optics
Shop
Contact
Gotocontent
InstallTensorFlowAddonsonJetsonNano
TensorFlowLite
TensorFlow
Introduction.TensorFlowAddonsgiveyouadditionalfunctionalitynotyetincludedinthecoreofTensorFlow.Ifithasprovenuseful,aparticularAddonmergedintotheTensorFlowpackage.OtheralgorithmsremainintheAddonsherd,onlyappreciatedbyaselectfewoftheTF-community.Duetotheexperimentalnatureofthepackage,versionshaveashortlifespan.Fourteenversionshavebeenreleasedin2020alone.Wehopetokeepupwiththepace.Ifnot,pleaseletusknow,andwewilltrytoprovidethemissingversiononourGitHubpage.
Tensorflow.Assaid,theAddonsworkwiththeTensorFlowframework,soyouneedtohaveaworkingTensorFlowversiononyoursystem.Ifrequired,youcaninstallarecentTensorFlowversionaccordingtooneofourguides.YoucancheckyourTensorFlowversionwiththedifferentAddonsversionhere.
Thewheel.OnceyouhaveTensorFlowupandrunning,youcaninstalltheAddons.TheeasiestwaytoinstalltheTensorFlow-AddonsisbyusingthewheelwehaveplacedonourGitHubpage.It'stheoutcomeofthetime-consuminginstallationfromscratchbyBazel,giveninthenextparagraph.Pleasefollowtheinstructions.
#downloadthewheel$wgethttps://github.com/Qengineering/TensorFlow-Addons-Jetson-Nano/raw/main/tensorflow_addons-0.13.0.dev0-cp36-cp36m-linux_aarch64.whl#installthewheel$sudo-Hpip3installtensorflow_addons-0.13.0.dev0-cp36-cp36m-linux_aarch64.whl
Youcannowchecktheinstallation,ascanbeseeninthescreendumpbelow.
Installationfromscratch.BuildingtheTensorFlow-Addonsfromscratchisnotsodifficult.Itonlytakestimetocompileallcode.Intheend,yougetthesamewheelasweputonGitHub.Ifyouwanttosavesometime,feelfreetousethiswheel.IncaseyouwanttobuildtheAddonsyourself,here'sthecompleteguide.Bazel.First,youneedbazel,acommonlyusedbuildtoollikeCMake.WehavealreadyusedbazelduringthebuildingofTensorFlowfromscratch.PleaseseethisparagraphonhowtoinstallbazelonyourJetsonNano.TensorFlowcode.TheAddonsusetheTensorFlowcodefortheCUDAacceleration.YouneedtodownloadtheTensorFlowrepoandissuea./configurecommand.Youdon'tactuallybuildTensorFlow,youjustsetuptheenvironments,soBaselcandeterminewhichCUDAarchitectureit'sfacing.WeusedTensorFlow2.4.1intheinstructions,butitcanbeanyversionofyourchoice.Youonlyhavetochangethenumbering.
#downloadTensorFlow2.4.1$wget-Otensorflow.ziphttps://github.com/tensorflow/tensorflow/archive/v2.4.1.zip#unpackandgivethefolderaconvenientname$unziptensorflow.zip$mvtensorflow-2.4.1tensorflow$cdtensorflow#revealtheCUDAlocation$sudosh-c"echo'/usr/local/cuda/lib64'>>/etc/ld.so.conf.d/nvidia-tegra.conf"$sudoldconfig#givethesettings$./configure
jetson@nano:~/tensorflow$./configureYouhavebazel3.1.0-(@non-git)installed.Pleasespecifythelocationofpython.[Defaultis/usr/bin/python3]:
延伸文章資訊
- 1TensorFlow Addons
- 2Module: tfa | TensorFlow Addons
Useful extra functionality for TensorFlow maintained by SIG-addons.
- 3Problem with using Tensorflow addons' metrics correctly in ...
Problem with using Tensorflow addons' metrics correctly in functional API · OS Platform and Distr...
- 4TensorFlow Addons
A library of useful extra functionality for TensorFlow maintained by SIG-addons with community co...
- 5tensorflow_addons(tfa)安装与使用_Tylor_Durden的博客
pip install tensorflow-addons. 1. 需要注意tfa版本与tf版本对应,官方github上列出了对应关系:. 在这里插入图片描述 可以安装指定版本: