Google Colab - Using Free GPU - Tutorialspoint
文章推薦指數: 80 %
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
延伸文章資訊
- 1用Google Colab 免費GPU 訓練AI 模型教學
今天來教學一下如何用免費的Google Colab GPU,透過Keras 內建的VGG Model 來串接訓練自己的模型網路。Google Colab 中提供了免費的GPU/TPU 提供給想 ...
- 2Google Colab
Colab Pro and Pro+ provide priority access to faster GPUs, longer running notebooks and more memo...
- 3Python深度學習1:Google Colab介紹 - 大大通
Google Colab是一個基於Jupyter Notebook 的免費CPU虛擬機,透過瀏覽器即可 ... 免費使用GPU或TPU:Colab中可選用的GPU通常包括Nvidia K80,T...
- 4第一次用Google Colab 就上手
既然有免費的GPU 可以使用,大家當然也會想知道到底被分配到了多少GPU 能夠使用,因此這邊提供兩個方法讓各位查看GPU 的相關訊息。 方法一:輸入 !nvidia- ...
- 5Google Colab - Using Free GPU - Tutorialspoint
Google Colab - Using Free GPU · Enabling GPU. To enable GPU in your notebook, select the followin...