Google Colab - Using Free GPU - Tutorialspoint

文章推薦指數: 80 %
投票人數:10人

Google Colab - Using Free GPU · Enabling GPU. To enable GPU in your notebook, select the following menu options − · Testing for GPU. You can easily check if the ... GoogleColabTutorial GoogleColab-Home GoogleColab-Introduction WhatisGoogleColab? YourFirstColabNotebook DocumentingYourCode GoogleColab-SavingYourWork GoogleColab-SharingNotebook InvokingSystemCommands ExecutingExternalPythonFiles GoogleColab-GraphicalOutputs GoogleColab-CodeEditingHelp GoogleColab-Magics GoogleColab-AddingForms GoogleColab-InstallingMLLibraries GoogleColab-UsingFreeGPU GoogleColab-Conclusion GoogleColabUsefulResources GoogleColab-QuickGuide GoogleColab-UsefulResources GoogleColab-Discussion SelectedReading UPSCIASExamsNotes Developer'sBestPractices QuestionsandAnswers EffectiveResumeWriting HRInterviewQuestions ComputerGlossary WhoisWho GoogleColab-UsingFreeGPU Advertisements PreviousPage NextPage  GoogleprovidestheuseoffreeGPUforyourColabnotebooks. EnablingGPU ToenableGPUinyournotebook,selectthefollowingmenuoptions− Runtime/Changeruntimetype Youwillseethefollowingscreenastheoutput− SelectGPUandyournotebookwouldusethefreeGPUprovidedinthecloudduringprocessing.TogetthefeelofGPUprocessing,tryrunningthesampleapplicationfromMNISTtutorialthatyouclonedearlier. !python3"/content/drive/MyDrive/app/mnist_cnn.py" TryrunningthesamePythonfilewithouttheGPUenabled.Didyounoticethedifferenceinspeedofexecution? TestingforGPU YoucaneasilycheckiftheGPUisenabledbyexecutingthefollowingcode− importtensorflowastf tf.test.gpu_device_name() IftheGPUisenabled,itwillgivethefollowingoutput− '/device:GPU:0' ListingDevices Ifyouarecurioustoknowthedevicesusedduringtheexecutionofyournotebookinthecloud,trythefollowingcode− fromtensorflow.python.clientimportdevice_lib device_lib.list_local_devices() Youwillseetheoutputasfollows− [name:"/device:CPU:0" device_type:"CPU" memory_limit:268435456 locality{} incarnation:1734904979049303143,name:"/device:XLA_CPU:0" device_type:"XLA_CPU"memory_limit:17179869184 locality{} incarnation:16069148927281628039 physical_device_desc:"device:XLA_CPUdevice",name:"/device:XLA_GPU:0" device_type:"XLA_GPU" memory_limit:17179869184 locality{} incarnation:16623465188569787091 physical_device_desc:"device:XLA_GPUdevice",name:"/device:GPU:0" device_type:"GPU" memory_limit:14062547764 locality{ bus_id:1 links{} } incarnation:6674128802944374158 physical_device_desc:"device:0,name:TeslaT4,pcibusid:0000:00:04.0,computecapability:7.5"] CheckingRAM Toseethememoryresourcesavailableforyourprocess,typethefollowingcommand− !cat/proc/meminfo Youwillseethefollowingoutput− MemTotal:13335276kB MemFree:7322964kB MemAvailable:10519168kB Buffers:95732kB Cached:2787632kB SwapCached:0kB Active:2433984kB Inactive:3060124kB Active(anon):2101704kB Inactive(anon):22880kB Active(file):332280kB Inactive(file):3037244kB Unevictable:0kB Mlocked:0kB SwapTotal:0kB SwapFree:0kB Dirty:412kB Writeback:0kB AnonPages:2610780kB Mapped:838200kB Shmem:23436kB Slab:183240kB SReclaimable:135324kB SUnreclaim:47916 kBKernelStack:4992kB PageTables:13600kB NFS_Unstable:0kB Bounce:0kB WritebackTmp:0kB CommitLimit:6667636kB Committed_AS:4801380kB VmallocTotal:34359738367kB VmallocUsed:0kB VmallocChunk:0kB AnonHugePages:0kB ShmemHugePages:0kB ShmemPmdMapped:0kB HugePages_Total:0 HugePages_Free:0 HugePages_Rsvd:0 HugePages_Surp:0 Hugepagesize:2048kB DirectMap4k:303092kB DirectMap2M:5988352kB DirectMap1G:9437184kB YouarenowallsetforthedevelopmentofmachinelearningmodelsinPythonusingGoogleColab. UsefulVideoCourses Video GooglePlusOnlineTraining 20Lectures 2.5hours AsifHussain MoreDetail Video GoogleTagManagerOnlineTraining 7Lectures 1hours AdityaKulkarni MoreDetail Video ImageSEOMadeSimple:GoogleSearchEngineGrowthHacking 33Lectures 2.5hours SashaMiller MoreDetail Video VideoSEO:RankHigherinGoogle&YouTube 22Lectures 1.5hours ZachMiller MoreDetail Video SEO:PerfectSEOOptimizedArticlestoRankPage1onGoogle 16Lectures 1.5hours SashaMiller MoreDetail Video SEOWordpress:RankHigherinGoogle,Bing&Yahoo 23Lectures 2.5hours SashaMiller MoreDetail PreviousPage PrintPage NextPage  Advertisements Print  AddNotes  Bookmarkthispage  ReportError  Suggestions Save Close Dashboard Logout



請為這篇文章評分?