SlideShare uma empresa Scribd logo
1 de 32
國立臺北護理健康大學 NTUNHS
Google CoLab
Orozco Hsu
2022-03-07
1
About me
• Education
• NCU (MIS)、NCCU (CS)
• Work Experience
• Telecom big data Innovation
• AI projects
• Retail marketing technology
• User Group
• TW Spark User Group
• TW Hadoop User Group
• Taiwan Data Engineer Association Director
• Research
• Big Data/ ML/ AIOT/ AI Columnist
2
Tutorial
Content
3
Compare different runtime
Flower classification in TPU accelerator
Homework
Register Google CoLab and let’s started
Code
• Download code
• https://github.com/orozcohsu/ntunhs_2022_01.git
• Folder/file
• 20220307_inter_master/run.ipynb
4
Code
5
Click button
Open it with Colab
Copy it to your
google drive
Check your google
drive
Google CoLab
• A jupyter notebook based coding environment for python developer
and most popular python packages such like numpy, scikit-learn,
tensorflow, keras, pandas and matplotlib…
• It also supports hardware accelerate runtime for model building.
• GPU (Graphics Processing Unit): Nvidia K80, T4, P4 or P100
• TPU (Tensor Processing Unit): Cloud TPU | Google Cloud
• The notebook instance lasts 12 hours running and kernel session for 1
hour.
• Pay 9.99 USD/month choosing better plans (CoLab Pro or more)
• Plan price: Google Colab
6
Google CoLab
• Which One Do You Choose For Training Your Deep Neural Net?
7
Ref: https://www.predictiveanalyticsworld.com/machinelearningtimes/should-you-choose-a-gpu-or-a-tpu-to-train-your-machine-learning-models/10460/
check_colab_gpu_tpu.ipynb
Google CoLab
• Get a google account and use google drive service
• Launch a CoLab service
• Jupyter files repository
• Training, test dataset repository
• Model files repository
• Fast launcher with github repository ipynb file
8
Google CoLab
• CoLab limitation
• It can give you instances with 12GB of RAM and GPU for 12 hours (Max.) for
free use
• Save checkpoints during training to avoid time limitation
• Not for cryptocurrency mining
• Check CoLab FAQ
• More details: https://research.google.com/colaboratory/faq.html
• TPU price: https://cloud.google.com/tpu/pricing
9
Let’s started
10
Let’s started
11
Let’s started
12
Let’s started
13
Let’s started
14
Let’s started
15
Let’s started
• A new web jupyter notebook (has connected) called the runtime.
• Using web browser interacting with CoLab (jupyter notebook) called a
web session.
• Python running through python-kernel (runtime)
16
Let’s started
• Set auto-refresh CoLab webpage, avoid to have an idle timeout
• Press F12, run above code in console
• Don’t close the webpage until you won’t use it anymore
17
function ConnectButton(){
console.log("Connect pushed");
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click()
}
setInterval(ConnectButton,60000);
After executed, your CoLab webpage will sometime switch back working area
automatically in order to avoid the idle timeout
Ref: https://research.google.com/colaboratory/faq.html#idle-timeouts
Let’s started
18
File name and
configuration
Cell (coding area)
Session connection
Cell control
panel
Command palette (type logs or scratch or editor)
kernel running?
Let’s started
• Make a connection
19
Local runtime: https://research.google.com/colaboratory/local-runtimes.html
Let’s started
20
After connecting to a hosted runtime
Let’s started
21
Return runtime resource to google
Let’s started
• Runtime (virtual machine) description
22
Let’s started
• Using cgroup to control
linux resources
• Check:
https://shekhargulati.co
m/2019/01/03/how-
docker-uses-cgroups-to-
set-resource-limits/
23
Let’s started
• Check runtime disk space and directories
24
Working folder
Let’s started
25
Let’s started
26
Google provides poor TPU to free usage, and more advanced TPU is chargeable.
Let’s started
• Mount a resource from google drive and access it (Using pydrive)
27
colab_google_drive.ipynb
get folder id
Compare different runtime
• GPU vs CPU performance comparison
28
tf2_cpu_gpu_colab.ipynb
Other Topics
• Google Cloud Platform (GCP)
• https://cloud.google.com/
• CoLab integrates with BigQuery
• CoLab integrates with GCS (TPU only)
• To more fully use the parallelism, and to avoid bottlenecking on data transfer
29
Other Topics
• New features of CoLab
• Charts visualization
• Downloading Datasets into Google Drive via Google Colab
• https://towardsdatascience.com/downloading-datasets-into-google-drive-via-
google-colab-bcb1b30b0166
30
interacting_table.ipynb
colab_charts.ipynb
Flower classification
• The model will take as input a photo of a flower and return whether it
is a daisy, dandelion, rose, sunflower, or tulip.
• Using keras framework on TPU tensorflow 2.x.
31
The code is from: https://colab.research.google.com/notebooks/tpu.ipynb
tpu_colab.ipynb
Homework
• Try to create a iris classification project on colab follow the link
below.
• https://medium.com/@yosik81/machine-learning-in-30-minutes-
with-python-and-google-colab-6e6dfb77f5e1
32

Mais conteúdo relacionado

Semelhante a 1_International_Google_CoLab_20220307.pptx

August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 

Semelhante a 1_International_Google_CoLab_20220307.pptx (20)

Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
2018 02 20-jeg_index
2018 02 20-jeg_index2018 02 20-jeg_index
2018 02 20-jeg_index
 
Machine learning in cybersecutiry
Machine learning in cybersecutiryMachine learning in cybersecutiry
Machine learning in cybersecutiry
 
PyData Boston 2013
PyData Boston 2013PyData Boston 2013
PyData Boston 2013
 
Leveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioningLeveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioning
 
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioningLeveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
 
Introduction to EasyBuild: Tutorial Part 1
Introduction to EasyBuild: Tutorial Part 1Introduction to EasyBuild: Tutorial Part 1
Introduction to EasyBuild: Tutorial Part 1
 
DevOps & SRE at Google Scale
DevOps & SRE at Google ScaleDevOps & SRE at Google Scale
DevOps & SRE at Google Scale
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
 
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
 
Microsoft & Open Source - a 'brave new world' - ProgSCon 2017
Microsoft & Open Source - a 'brave new world' - ProgSCon 2017Microsoft & Open Source - a 'brave new world' - ProgSCon 2017
Microsoft & Open Source - a 'brave new world' - ProgSCon 2017
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
 
Intro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdfIntro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdf
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Jupyter notebooks on steroids
Jupyter notebooks on steroidsJupyter notebooks on steroids
Jupyter notebooks on steroids
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 
Netflix Open Source: Building a Distributed and Automated Open Source Program
Netflix Open Source:  Building a Distributed and Automated Open Source ProgramNetflix Open Source:  Building a Distributed and Automated Open Source Program
Netflix Open Source: Building a Distributed and Automated Open Source Program
 
Building a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at NetflixBuilding a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at Netflix
 

Mais de FEG

資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
FEG
 
2023 Supervised_Learning_Association_Rules
2023 Supervised_Learning_Association_Rules2023 Supervised_Learning_Association_Rules
2023 Supervised_Learning_Association_Rules
FEG
 
202312 Exploration Data Analysis Visualization (English version)
202312 Exploration Data Analysis Visualization (English version)202312 Exploration Data Analysis Visualization (English version)
202312 Exploration Data Analysis Visualization (English version)
FEG
 
202312 Exploration of Data Analysis Visualization
202312 Exploration of Data Analysis Visualization202312 Exploration of Data Analysis Visualization
202312 Exploration of Data Analysis Visualization
FEG
 
4_Regression_analysis.pdf
4_Regression_analysis.pdf4_Regression_analysis.pdf
4_Regression_analysis.pdf
FEG
 

Mais de FEG (20)

Sequence Model pytorch at colab with gpu.pdf
Sequence Model pytorch at colab with gpu.pdfSequence Model pytorch at colab with gpu.pdf
Sequence Model pytorch at colab with gpu.pdf
 
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
 
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
 
Pytorch cnn netowork introduction 20240318
Pytorch cnn netowork introduction 20240318Pytorch cnn netowork introduction 20240318
Pytorch cnn netowork introduction 20240318
 
2023 Decision Tree analysis in business practices
2023 Decision Tree analysis in business practices2023 Decision Tree analysis in business practices
2023 Decision Tree analysis in business practices
 
2023 Clustering analysis using Python from scratch
2023 Clustering analysis using Python from scratch2023 Clustering analysis using Python from scratch
2023 Clustering analysis using Python from scratch
 
2023 Data visualization using Python from scratch
2023 Data visualization using Python from scratch2023 Data visualization using Python from scratch
2023 Data visualization using Python from scratch
 
2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratch2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratch
 
2023 Supervised_Learning_Association_Rules
2023 Supervised_Learning_Association_Rules2023 Supervised_Learning_Association_Rules
2023 Supervised_Learning_Association_Rules
 
202312 Exploration Data Analysis Visualization (English version)
202312 Exploration Data Analysis Visualization (English version)202312 Exploration Data Analysis Visualization (English version)
202312 Exploration Data Analysis Visualization (English version)
 
202312 Exploration of Data Analysis Visualization
202312 Exploration of Data Analysis Visualization202312 Exploration of Data Analysis Visualization
202312 Exploration of Data Analysis Visualization
 
Transfer Learning (20230516)
Transfer Learning (20230516)Transfer Learning (20230516)
Transfer Learning (20230516)
 
Image Classification (20230411)
Image Classification (20230411)Image Classification (20230411)
Image Classification (20230411)
 
Supervised Learning
Supervised LearningSupervised Learning
Supervised Learning
 
UnSupervised Learning Clustering
UnSupervised Learning ClusteringUnSupervised Learning Clustering
UnSupervised Learning Clustering
 
Data Visualization in Excel
Data Visualization in ExcelData Visualization in Excel
Data Visualization in Excel
 
6_Association_rule_碩士班第六次.pdf
6_Association_rule_碩士班第六次.pdf6_Association_rule_碩士班第六次.pdf
6_Association_rule_碩士班第六次.pdf
 
5_Neural_network_碩士班第五次.pdf
5_Neural_network_碩士班第五次.pdf5_Neural_network_碩士班第五次.pdf
5_Neural_network_碩士班第五次.pdf
 
4_Regression_analysis.pdf
4_Regression_analysis.pdf4_Regression_analysis.pdf
4_Regression_analysis.pdf
 
3_Decision_tree.pdf
3_Decision_tree.pdf3_Decision_tree.pdf
3_Decision_tree.pdf
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

1_International_Google_CoLab_20220307.pptx

  • 2. About me • Education • NCU (MIS)、NCCU (CS) • Work Experience • Telecom big data Innovation • AI projects • Retail marketing technology • User Group • TW Spark User Group • TW Hadoop User Group • Taiwan Data Engineer Association Director • Research • Big Data/ ML/ AIOT/ AI Columnist 2
  • 3. Tutorial Content 3 Compare different runtime Flower classification in TPU accelerator Homework Register Google CoLab and let’s started
  • 4. Code • Download code • https://github.com/orozcohsu/ntunhs_2022_01.git • Folder/file • 20220307_inter_master/run.ipynb 4
  • 5. Code 5 Click button Open it with Colab Copy it to your google drive Check your google drive
  • 6. Google CoLab • A jupyter notebook based coding environment for python developer and most popular python packages such like numpy, scikit-learn, tensorflow, keras, pandas and matplotlib… • It also supports hardware accelerate runtime for model building. • GPU (Graphics Processing Unit): Nvidia K80, T4, P4 or P100 • TPU (Tensor Processing Unit): Cloud TPU | Google Cloud • The notebook instance lasts 12 hours running and kernel session for 1 hour. • Pay 9.99 USD/month choosing better plans (CoLab Pro or more) • Plan price: Google Colab 6
  • 7. Google CoLab • Which One Do You Choose For Training Your Deep Neural Net? 7 Ref: https://www.predictiveanalyticsworld.com/machinelearningtimes/should-you-choose-a-gpu-or-a-tpu-to-train-your-machine-learning-models/10460/ check_colab_gpu_tpu.ipynb
  • 8. Google CoLab • Get a google account and use google drive service • Launch a CoLab service • Jupyter files repository • Training, test dataset repository • Model files repository • Fast launcher with github repository ipynb file 8
  • 9. Google CoLab • CoLab limitation • It can give you instances with 12GB of RAM and GPU for 12 hours (Max.) for free use • Save checkpoints during training to avoid time limitation • Not for cryptocurrency mining • Check CoLab FAQ • More details: https://research.google.com/colaboratory/faq.html • TPU price: https://cloud.google.com/tpu/pricing 9
  • 16. Let’s started • A new web jupyter notebook (has connected) called the runtime. • Using web browser interacting with CoLab (jupyter notebook) called a web session. • Python running through python-kernel (runtime) 16
  • 17. Let’s started • Set auto-refresh CoLab webpage, avoid to have an idle timeout • Press F12, run above code in console • Don’t close the webpage until you won’t use it anymore 17 function ConnectButton(){ console.log("Connect pushed"); document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click() } setInterval(ConnectButton,60000); After executed, your CoLab webpage will sometime switch back working area automatically in order to avoid the idle timeout Ref: https://research.google.com/colaboratory/faq.html#idle-timeouts
  • 18. Let’s started 18 File name and configuration Cell (coding area) Session connection Cell control panel Command palette (type logs or scratch or editor) kernel running?
  • 19. Let’s started • Make a connection 19 Local runtime: https://research.google.com/colaboratory/local-runtimes.html
  • 20. Let’s started 20 After connecting to a hosted runtime
  • 21. Let’s started 21 Return runtime resource to google
  • 22. Let’s started • Runtime (virtual machine) description 22
  • 23. Let’s started • Using cgroup to control linux resources • Check: https://shekhargulati.co m/2019/01/03/how- docker-uses-cgroups-to- set-resource-limits/ 23
  • 24. Let’s started • Check runtime disk space and directories 24 Working folder
  • 26. Let’s started 26 Google provides poor TPU to free usage, and more advanced TPU is chargeable.
  • 27. Let’s started • Mount a resource from google drive and access it (Using pydrive) 27 colab_google_drive.ipynb get folder id
  • 28. Compare different runtime • GPU vs CPU performance comparison 28 tf2_cpu_gpu_colab.ipynb
  • 29. Other Topics • Google Cloud Platform (GCP) • https://cloud.google.com/ • CoLab integrates with BigQuery • CoLab integrates with GCS (TPU only) • To more fully use the parallelism, and to avoid bottlenecking on data transfer 29
  • 30. Other Topics • New features of CoLab • Charts visualization • Downloading Datasets into Google Drive via Google Colab • https://towardsdatascience.com/downloading-datasets-into-google-drive-via- google-colab-bcb1b30b0166 30 interacting_table.ipynb colab_charts.ipynb
  • 31. Flower classification • The model will take as input a photo of a flower and return whether it is a daisy, dandelion, rose, sunflower, or tulip. • Using keras framework on TPU tensorflow 2.x. 31 The code is from: https://colab.research.google.com/notebooks/tpu.ipynb tpu_colab.ipynb
  • 32. Homework • Try to create a iris classification project on colab follow the link below. • https://medium.com/@yosik81/machine-learning-in-30-minutes- with-python-and-google-colab-6e6dfb77f5e1 32