Faster Machine Learning Training with a GPU or TPU
文章推薦指數: 80 %
You can use the Jupyter Notebook on your local computer. Google Colab improves on the Jupyter Notebook in many ways. HomeNotificationsListsStoriesWritePublishedinTowardsDataScienceFasterMachineLearningTrainingwithaGPUorTPUGoogleColabcanaccessanypublicJupyterNotebookfromGitHuborDriveMachineLearningJupyterNotebooksRunForFreeonColab.PhotobyNanaDuaonUnsplashWhyUseGoogleColab?YoucanusetheJupyterNotebookonyourlocalcomputer.GoogleColabimprovesontheJupyterNotebookinmanyways.HerearethesevenmostpowerfulreasonstouseGoogleColab:YoucangetanypublicJupyterNotebookfromaGitHubrepository.Youload,edit,andsaveany.ipynbfiletotheGoogleDriveassociatedwiththeColablogin.ItishelpfultohaveaseparateGoogleaccountforeachprojectandthusadifferentGoogleDrive.Note:YoucancreateaGitaccountforanyprojectfolderonGoogleDrive.Eachteammemberhostsonavarietyofdifferentlocalcomputers.Alltheyneedisabrowserandinternetconnection.Yourteamcanbefullydistributedgeographicallybythecloud.3.YoucanprovisiononeofmanygenerationsoftheNVIDIAGPU.4.YoucanprovisiononeofmanygenerationsoftheGoogleTPU.5.Youcanprovisionamulti-coreCPU.6.GoogleColabisfree.Also,youcanupgradetoapremiumversionthatcosts$9.99permonthperaccount.7.AColabnotebookhasmanyusefulextensionsofaJupyterNotebook.LoadingaFileIntoColabFromaGitHubRepoInabrowser,headtohttps://colab.research.google.com.AnewtabpointingtoGoogleColabopens:Figure1:EntrancetoGoogleColab.IfyouarenewtoColab,theonlyfileinRecentisWelcometoCollaboratory.AsIamnotnew,youcancountfivefilesinRecent.LoadingFilesFromGitHubClickonGitHubandobserve:Figure2:ClickingonGitHub.EntertheGitHubaccountyouwanttobrowse.Ienteredbcottman,myGitHubtop-levelrepository.Figure3:Choosingbcottman/pasorepoFromtherepobcottman/paso,Ichosethefilebcottman/paso/integration_test_pre_all.ipynb.Figure4:Choosingthefilebcottman/paso/integration_test_pre_all.ipynb.Thisresultsinthefilebcottman/paso/integration_test_pre_all.ipynbbeingloadedintotheGCP(GoogleCloudPlatform)Colabbrowser.Figure5:Filebcottman/paso/integration_test_pre_all.ipynbloadedintoGoogleColab.LoadingFilesFromGoogleDriveYoucancreateaGoogleDriveandthencreateaGitaccountforanyprojectfolder.Youaregoingtohttps://colab.research.google.com.MounttheGoogleDriveoftheGoogleaccount.AllfilesintheGoogleDrivewillappearwhenyouclickonFile|Opennotebook:Figure6:ClickonFile|Opennotebook.Selectthecolab_itils.ipynbfile:Figure7:Top-levelfilesinGoogleDrive.ProvisiononeofmanygenerationsoftheNVIDIAGPUClickonRuntime|Changeruntimetype:toprovisionanNvidiaGPU:Figure8:ClickonRuntime|Changeruntimetype:toprovisionanNvidiaGPUFigure9:SelectGPU.ThestatusofprovisioningtheNvidiaGPUischeckedwith:Thefromtensorflow.python.clientimportdevice_libdevice_lib.list_local_devices()Output:[name:"/device:CPU:0"device_type:"CPU"memory_limit:268435456locality{}incarnation:17311008600223054265,name:"/device:GPU:0"device_type:"GPU"memory_limit:14674281152locality{bus_id:1links{}}incarnation:7680686309919727928physical_device_desc:"device:0,name:TeslaT4,pcibusid:0000:00:04.0,computecapability:7.5"]AnNvidiaTelsaT4with14.67GBoffastmemoryisprovided.ProvisionGoogleTPUToprovisionaGoogleTPU,selectTPUinthe“Notebooksettings”:Figure10:SelectTPU.ConclusionInthisshortarticle,Ishowedhow:YoucangetanypublicfilefromaGitHubrepository.Youcanload,edit,andsaveany.ipynbfiletotheGoogleDriveassociatedwiththeColablogin.3.YoucanprovisiononeofmanygenerationsoftheNVIDIAGPU.4.YoucanprovisiononeofmanygenerationsoftheGoogleTPU.OnecriticalcapabilitywithGoogleColabisthatteammemberscancollaborateonaprojectusingsharedfilesonGitHub.Also,eachteammembercancreatetheirdevelopmentsandboxontheirownGoogleDrive.Thecloudempowersremotework.Happycoding!MorefromTowardsDataScienceFollowYourhomefordatascience.AMediumpublicationsharingconcepts,ideasandcodes.ReadmorefromTowardsDataScienceMorefromMediumDeepLearningMultiviewStereo(MVS)ThegoalofMultiviewStereo(MVS)istogeneratea3Dpointcloudormodelfrompicturestakenfromdifferentlocations.Itisaproblem…Detectingplaceholderimagesine-CommerceproductlistingsIntroducingEarthAINotebookANewEnvironmentforGeospatialAnalyticsE-MailAutomationusingPython.Recently,whileworkingonaprojectIlandedonE-MailMarketing.Lookingatthetoolsusedforthiskindofmarketing,Iwasamazedthat…LeNet5,AlexNet,VGG-16fromdeeplearning.aiGuidetoDimensionalityReductioninsinglecellRNA-seqanalysisMachineLearningHasBeenUsedtoAutomaticallyTranslateLong-LostLanguagesPart2:Selectingtherightweightinitializationforyourdeepneuralnetwork.GetstartedBruceH.Cottman,Ph.D.1.3KFollowersIexploredecadesofexperienceincomputersandthewonderofothertechnologies.Expandyourmind:https://dr-bruce-cottman.medium.com/membershipFollowRelatedTensorFlowCallbacks — HowtoMonitorNeuralNetworkTrainingLikeaProHyperParameterOptimizationwithGrid.aiandNoCodeChangeTransferLearning:TheHighestLeverageDeepLearningSkillYouCanLearn.HelpStatusWritersBlogCareersPrivacyTermsAboutKnowable
延伸文章資訊
- 1五分鐘學會在Colab上使用免費的TPU訓練模型 - 資料科學實驗室
... 而除了GPU之外,大家一定很想使用Google所推出的Google Cloud TPU來做機器學習模型,重點它很貴,能不能免費的使用他呢?使用Colab就是首選了。
- 2Comparing GPU and TPU training performance on Google ...
... training time on the TPU accelerator is compared to the existing GPU (NVIDIA K80) accelerator...
- 3【 Google Colaboratory 可以用TPU 了! 】... - Python 資料 ...
【 Google Colaboratory 可以用TPU 了! 】 之前跟大家介紹過Google Colaboratory 提供了免費GPU 可以使用,現在還可以用TPU (v2) 來訓練了! ...
- 4Ever wondered what GPU or TPU Google Colab provides?
- 5Comparing GPU and TPU training performance on Google ...