SlideShare a Scribd company logo
1 of 15
GETTING STARTED WITH
GPU ACCELERATED DEEP
LEARNING
A CRISP TALK FOR ANTHILL INSIDE 2017
DEEP LEARNING: OVERVIEW
• Comprised of neurons and layers
• Depth of the network = number of hidden layers
• Number of parameters = number of weights
• Learning using data over time
• Output at every node: 𝑓 𝑖
𝑛
𝑤𝑖 𝑥𝑖 + 𝑏
• Activation function: f
• Examples of activation function: linear, sigmoid
• Many different types:
• Convolutional Neural Networks (CNNs)
• Recurrent Neural Networks (RNNs)
EXAMPLE DEEP LEARNING ARCHITECTURE:
DEEPFACE
• Nine layers “deep”
• 120 million parameters
• Trained on 4 million face images
GPU HORSEPOWER ON THE CLOUD
• “On-demand” GPU computing power with high reliability
• Providers:
• Amazon EC2
• IBM Softlayer Bare Metal Servers
• Nimbix
• Google (Beta)
• Microsoft (public availability in December)
GETTING STARTED: CUDA TOOLKIT AND
DRIVERS
• Step 1: Download CUDA (https://developer.nvidia.com/cuda-
downloads)
• Step 2: Check the md5 sum and verify before continuing
• Step 3: Remove any other installation (“sudo apt-get purge
nvidia-cuda*” - if you want to install the drivers too, then “sudo
apt-get purge nvidia-*”.)
• Step 4: Follow the command-line prompts
• Step 5: Verify using “nvcc --version”
GETTING STARTED: CUDNN
• Step 0: Install CUDA from the standard repositories
• Step 1: Register an nVIDIA developer account and download cuDNN
(https://developer.nvidia.com/cudnn)
• Step 2: Check where your CUDA installation is. You can check it with “which
nvcc” or “ldconfig -p | grep cuda”
• Step 3: Copy the files:
• $ cd folder/extracted/contents
• $ sudo cp -P include/cudnn.h /usr/include
• $ sudo cp -P lib64/libcudnn* /usr/lib/x86_64-linux-gnu/
• $ sudo chmod a+r /usr/lib/x86_64-linux-gnu/libcudnn*
GETTING STARTED: ANACONDA
• Choose Anaconda if you:
• Are new to conda or Python
• Like the convenience of having Python and over 150 scientific packages
automatically installed at once
• Have the time and disk space (a few minutes and 3 GB), and/or
• Don’t want to install each of the packages you want to use individually.
GETTING STARTED: CONDA
ENVIRONMENTS
• Isolated packages of libraries and dependencies
• Create:
• “conda create –name <name> <package>”
• Activate/Deactivate environment:
• “source activate <name>”/ “source deactivate”
• Any changes you make to Python libraries is contained within the
active environment
• Importing an environment:
• “conda env create –f <name of environment.yml file>
• More about environments: https://conda.io/docs/using/envs.html
GETTING STARTED: THE LIBRARIES
• Numpy, Scipy (pre-installed with Anaconda)
• Keras, Scikit-Learn (sklearn), Matplotlib, PIL:
• “conda create --name anthill scikit-learn matplotlib keras pillow”
• OpenCV:
• After activating the source, execute:
• “conda install -c menpo opencv”
• Tensorflow CPU/GPU mode:
• “pip install --upgrade tensorflow” / “pip install --upgrade tensorflow-gpu”
DEEP LEARNING IN ACTION: WBC
CLASSIFICATION
For full details visit: https://blog.athelas.com/classifying-white-blood-cells-with-convolutional-
neural-networks-2ca6da239331
DEEP LEARNING IN ACTION: WBC
CLASSIFICATION
• Five layers “deep”
• Almost 1 million parameters
DEEP LEARNING IN ACTION: WBC
CLASSIFICATION
• 352 images of size 640x480
• 21 Monocyte (Mononuclear)
• 33 Lymphocyte
(Mononuclear)
• 207 Neutrophil (Polynuclear)
• 88 Eosinophil (Polynuclear)
• 3 Basophil (Mononuclear)
DEEP LEARNING IN ACTION: WBC
CLASSIFICATION
• Basophils removed
• From 352 to 10,000 images
with 2,500 of each category
• Images downsampled to
120x160
• Convert 4-class problem to
2-class problem
• Normalize pixel values from
0 to 255 to 0 and 1
GPU VS CPU FOR DEEP LEARNING
WORKLOADS
• Training on 7965 samples and validating on 1992 samples
• GPU Epoch time: 12 seconds for the first, 9 seconds thereafter
• CPU Epoch time: 109 seconds for the first, 105-107 seconds
thereafter
• Configuration:
• GPU: Tesla M60
• CPU: Intel® Xeon® Processor E5-2620 v3 @ 2.40 GHz x2
OUTPUT: TRAINING ON CPU (LEFT) VS GPU
(RIGHT)

More Related Content

Recently uploaded

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

Featured

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageSimplilearn
 

Featured (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Getting started with gpu accelerated deep learning

  • 1. GETTING STARTED WITH GPU ACCELERATED DEEP LEARNING A CRISP TALK FOR ANTHILL INSIDE 2017
  • 2. DEEP LEARNING: OVERVIEW • Comprised of neurons and layers • Depth of the network = number of hidden layers • Number of parameters = number of weights • Learning using data over time • Output at every node: 𝑓 𝑖 𝑛 𝑤𝑖 𝑥𝑖 + 𝑏 • Activation function: f • Examples of activation function: linear, sigmoid • Many different types: • Convolutional Neural Networks (CNNs) • Recurrent Neural Networks (RNNs)
  • 3. EXAMPLE DEEP LEARNING ARCHITECTURE: DEEPFACE • Nine layers “deep” • 120 million parameters • Trained on 4 million face images
  • 4. GPU HORSEPOWER ON THE CLOUD • “On-demand” GPU computing power with high reliability • Providers: • Amazon EC2 • IBM Softlayer Bare Metal Servers • Nimbix • Google (Beta) • Microsoft (public availability in December)
  • 5. GETTING STARTED: CUDA TOOLKIT AND DRIVERS • Step 1: Download CUDA (https://developer.nvidia.com/cuda- downloads) • Step 2: Check the md5 sum and verify before continuing • Step 3: Remove any other installation (“sudo apt-get purge nvidia-cuda*” - if you want to install the drivers too, then “sudo apt-get purge nvidia-*”.) • Step 4: Follow the command-line prompts • Step 5: Verify using “nvcc --version”
  • 6. GETTING STARTED: CUDNN • Step 0: Install CUDA from the standard repositories • Step 1: Register an nVIDIA developer account and download cuDNN (https://developer.nvidia.com/cudnn) • Step 2: Check where your CUDA installation is. You can check it with “which nvcc” or “ldconfig -p | grep cuda” • Step 3: Copy the files: • $ cd folder/extracted/contents • $ sudo cp -P include/cudnn.h /usr/include • $ sudo cp -P lib64/libcudnn* /usr/lib/x86_64-linux-gnu/ • $ sudo chmod a+r /usr/lib/x86_64-linux-gnu/libcudnn*
  • 7. GETTING STARTED: ANACONDA • Choose Anaconda if you: • Are new to conda or Python • Like the convenience of having Python and over 150 scientific packages automatically installed at once • Have the time and disk space (a few minutes and 3 GB), and/or • Don’t want to install each of the packages you want to use individually.
  • 8. GETTING STARTED: CONDA ENVIRONMENTS • Isolated packages of libraries and dependencies • Create: • “conda create –name <name> <package>” • Activate/Deactivate environment: • “source activate <name>”/ “source deactivate” • Any changes you make to Python libraries is contained within the active environment • Importing an environment: • “conda env create –f <name of environment.yml file> • More about environments: https://conda.io/docs/using/envs.html
  • 9. GETTING STARTED: THE LIBRARIES • Numpy, Scipy (pre-installed with Anaconda) • Keras, Scikit-Learn (sklearn), Matplotlib, PIL: • “conda create --name anthill scikit-learn matplotlib keras pillow” • OpenCV: • After activating the source, execute: • “conda install -c menpo opencv” • Tensorflow CPU/GPU mode: • “pip install --upgrade tensorflow” / “pip install --upgrade tensorflow-gpu”
  • 10. DEEP LEARNING IN ACTION: WBC CLASSIFICATION For full details visit: https://blog.athelas.com/classifying-white-blood-cells-with-convolutional- neural-networks-2ca6da239331
  • 11. DEEP LEARNING IN ACTION: WBC CLASSIFICATION • Five layers “deep” • Almost 1 million parameters
  • 12. DEEP LEARNING IN ACTION: WBC CLASSIFICATION • 352 images of size 640x480 • 21 Monocyte (Mononuclear) • 33 Lymphocyte (Mononuclear) • 207 Neutrophil (Polynuclear) • 88 Eosinophil (Polynuclear) • 3 Basophil (Mononuclear)
  • 13. DEEP LEARNING IN ACTION: WBC CLASSIFICATION • Basophils removed • From 352 to 10,000 images with 2,500 of each category • Images downsampled to 120x160 • Convert 4-class problem to 2-class problem • Normalize pixel values from 0 to 255 to 0 and 1
  • 14. GPU VS CPU FOR DEEP LEARNING WORKLOADS • Training on 7965 samples and validating on 1992 samples • GPU Epoch time: 12 seconds for the first, 9 seconds thereafter • CPU Epoch time: 109 seconds for the first, 105-107 seconds thereafter • Configuration: • GPU: Tesla M60 • CPU: Intel® Xeon® Processor E5-2620 v3 @ 2.40 GHz x2
  • 15. OUTPUT: TRAINING ON CPU (LEFT) VS GPU (RIGHT)