SlideShare a Scribd company logo
1 of 15
Download to read offline
Machine Learning
Part 2. Neural networks
Neural networks?
Neuron
Perceptron
Multi-layered
(deep)
Problems with
images
Problems with
images
Too big vectors
(200x200x3 =
120,000)
Pixel position
matters
Convolution
Pooling (sub-
sampling)
CNN
Neural Networks in
Python
pip install keras
open/create ~/.keras/keras.json edit
"image_dim_ordering": “th”;
“backend”: “theano”;
open script from: http://bit.ly/
empatika-keras-1
MNIST
Dogs & Cats
cd <folder that contains ‘data’
subfolder from Google Drive>
open/create ~/.keras/keras.json edit
“backend”: “tensorflow”;
open script from: http://bit.ly/
empatika-keras-2 (initial gist)
Pre-trained models
ResNet50
VGG16
cd <to deep-learning-models
subfolder>
ResNet50
from	resnet50	import	ResNet50	
from	keras.preprocessing	import	image	
from	imagenet_utils	import	preprocess_input,	decode_predictions	
import	numpy	as	np	
model	=	ResNet50(weights='imagenet')	
img_path	=	'elephant.jpg'	
img	=	image.load_img(img_path,	target_size=(224,	224))	
x	=	image.img_to_array(img)	
x	=	np.expand_dims(x,	axis=0)	
x	=	preprocess_input(x)	
preds	=	model.predict(x)	
print('Predicted:',	decode_predictions(preds))

More Related Content

What's hot

The Weather of the Century Part 2: High Performance
The Weather of the Century Part 2: High PerformanceThe Weather of the Century Part 2: High Performance
The Weather of the Century Part 2: High Performance
MongoDB
 

What's hot (20)

ClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei MilovidovClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei Milovidov
 
Spock Framework - Slidecast
Spock Framework - SlidecastSpock Framework - Slidecast
Spock Framework - Slidecast
 
Coco
CocoCoco
Coco
 
Erlang/N2O at KNPMeetup 2015
Erlang/N2O at KNPMeetup 2015Erlang/N2O at KNPMeetup 2015
Erlang/N2O at KNPMeetup 2015
 
Viktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning ServiceViktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning Service
 
The Ring programming language version 1.5.3 book - Part 73 of 184
The Ring programming language version 1.5.3 book - Part 73 of 184The Ring programming language version 1.5.3 book - Part 73 of 184
The Ring programming language version 1.5.3 book - Part 73 of 184
 
Ac cuda c_4
Ac cuda c_4Ac cuda c_4
Ac cuda c_4
 
Weather of the Century: Design and Performance
Weather of the Century: Design and PerformanceWeather of the Century: Design and Performance
Weather of the Century: Design and Performance
 
Леонид Шевцов «Clojure в деле»
Леонид Шевцов «Clojure в деле»Леонид Шевцов «Clojure в деле»
Леонид Шевцов «Clojure в деле»
 
The Ring programming language version 1.7 book - Part 67 of 196
The Ring programming language version 1.7 book - Part 67 of 196The Ring programming language version 1.7 book - Part 67 of 196
The Ring programming language version 1.7 book - Part 67 of 196
 
EKON22 Introduction to Machinelearning
EKON22 Introduction to MachinelearningEKON22 Introduction to Machinelearning
EKON22 Introduction to Machinelearning
 
HTML5 game dev with three.js - HexGL
HTML5 game dev with three.js - HexGLHTML5 game dev with three.js - HexGL
HTML5 game dev with three.js - HexGL
 
The Weather of the Century Part 2: High Performance
The Weather of the Century Part 2: High PerformanceThe Weather of the Century Part 2: High Performance
The Weather of the Century Part 2: High Performance
 
Is your profiler speaking the same language as you? -- Docklands JUG
Is your profiler speaking the same language as you? -- Docklands JUGIs your profiler speaking the same language as you? -- Docklands JUG
Is your profiler speaking the same language as you? -- Docklands JUG
 
Profiling Ruby
Profiling RubyProfiling Ruby
Profiling Ruby
 
Stackless Python 101
Stackless Python 101Stackless Python 101
Stackless Python 101
 
PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개
 
Entity System Architecture with Unity - Unite Europe 2015
Entity System Architecture with Unity - Unite Europe 2015Entity System Architecture with Unity - Unite Europe 2015
Entity System Architecture with Unity - Unite Europe 2015
 
Simple, fast, and scalable torch7 tutorial
Simple, fast, and scalable torch7 tutorialSimple, fast, and scalable torch7 tutorial
Simple, fast, and scalable torch7 tutorial
 
The Ring programming language version 1.5.2 book - Part 59 of 181
The Ring programming language version 1.5.2 book - Part 59 of 181The Ring programming language version 1.5.2 book - Part 59 of 181
The Ring programming language version 1.5.2 book - Part 59 of 181
 

Viewers also liked

Viewers also liked (17)

ANÁLISIS DE PRODUCTIVIDAD-RENTABILIDAD Y MEDICIÓN DE LA PRODUCTIVIDAD UTILIZA...
ANÁLISIS DE PRODUCTIVIDAD-RENTABILIDAD Y MEDICIÓN DE LA PRODUCTIVIDAD UTILIZA...ANÁLISIS DE PRODUCTIVIDAD-RENTABILIDAD Y MEDICIÓN DE LA PRODUCTIVIDAD UTILIZA...
ANÁLISIS DE PRODUCTIVIDAD-RENTABILIDAD Y MEDICIÓN DE LA PRODUCTIVIDAD UTILIZA...
 
Producto final slideshare rivera salas
Producto final slideshare rivera salasProducto final slideshare rivera salas
Producto final slideshare rivera salas
 
Legge Anticorruzione
Legge AnticorruzioneLegge Anticorruzione
Legge Anticorruzione
 
Product Management
Product ManagementProduct Management
Product Management
 
Costume list
Costume listCostume list
Costume list
 
3Com 17772-910-000
3Com 17772-910-0003Com 17772-910-000
3Com 17772-910-000
 
Act.1 tallerpractico10
Act.1 tallerpractico10Act.1 tallerpractico10
Act.1 tallerpractico10
 
книжка ізяслав
книжка ізяславкнижка ізяслав
книжка ізяслав
 
American Regionalism & Contemporary Communities
American Regionalism & Contemporary CommunitiesAmerican Regionalism & Contemporary Communities
American Regionalism & Contemporary Communities
 
Membrane bounded organelles
Membrane bounded organellesMembrane bounded organelles
Membrane bounded organelles
 
Singularity University Executive Program - Day 1
Singularity University Executive Program - Day 1Singularity University Executive Program - Day 1
Singularity University Executive Program - Day 1
 
introduction to artificial intelligence
introduction to artificial intelligenceintroduction to artificial intelligence
introduction to artificial intelligence
 
Singularity University Executive Program - Day 0
Singularity University Executive Program - Day 0Singularity University Executive Program - Day 0
Singularity University Executive Program - Day 0
 
Flow
FlowFlow
Flow
 
Screenshots of auidence feedback
Screenshots of auidence feedback Screenshots of auidence feedback
Screenshots of auidence feedback
 
31. código-de-procedimiento-civil(1)
31. código-de-procedimiento-civil(1)31. código-de-procedimiento-civil(1)
31. código-de-procedimiento-civil(1)
 
Depresīvu traucējumu atpazīšana bērniem un pusaudžiem, sarkanā karoga simptomi
Depresīvu traucējumu atpazīšana bērniem un pusaudžiem, sarkanā karoga simptomiDepresīvu traucējumu atpazīšana bērniem un pusaudžiem, sarkanā karoga simptomi
Depresīvu traucējumu atpazīšana bērniem un pusaudžiem, sarkanā karoga simptomi
 

Similar to Machine learning 2 - Neural Networks

I need  An expert person in machine learning  that can help me . I n.docx
I need  An expert person in machine learning  that can help me . I n.docxI need  An expert person in machine learning  that can help me . I n.docx
I need  An expert person in machine learning  that can help me . I n.docx
elishaoatway
 
IgniteATL - Hackintoshing
IgniteATL - HackintoshingIgniteATL - Hackintoshing
IgniteATL - Hackintoshing
Matt Smith
 
Viktor Tsykunov "Microsoft AI platform for every Developer"
Viktor Tsykunov "Microsoft AI platform for every Developer"Viktor Tsykunov "Microsoft AI platform for every Developer"
Viktor Tsykunov "Microsoft AI platform for every Developer"
Lviv Startup Club
 

Similar to Machine learning 2 - Neural Networks (20)

Final training course
Final training courseFinal training course
Final training course
 
I need  An expert person in machine learning  that can help me . I n.docx
I need  An expert person in machine learning  that can help me . I n.docxI need  An expert person in machine learning  that can help me . I n.docx
I need  An expert person in machine learning  that can help me . I n.docx
 
Tutorial: Image Generation and Image-to-Image Translation using GAN
Tutorial: Image Generation and Image-to-Image Translation using GANTutorial: Image Generation and Image-to-Image Translation using GAN
Tutorial: Image Generation and Image-to-Image Translation using GAN
 
Training course lect1
Training course lect1Training course lect1
Training course lect1
 
SeRanet introduction
SeRanet introductionSeRanet introduction
SeRanet introduction
 
29-kashyap-mask-detaction.pptx
29-kashyap-mask-detaction.pptx29-kashyap-mask-detaction.pptx
29-kashyap-mask-detaction.pptx
 
Deep Learning for Computer Vision - PyconDE 2017
Deep Learning for Computer Vision - PyconDE 2017Deep Learning for Computer Vision - PyconDE 2017
Deep Learning for Computer Vision - PyconDE 2017
 
MXNet Workshop
MXNet WorkshopMXNet Workshop
MXNet Workshop
 
Mastering Computer Vision Problems with State-of-the-art Deep Learning
Mastering Computer Vision Problems with State-of-the-art Deep LearningMastering Computer Vision Problems with State-of-the-art Deep Learning
Mastering Computer Vision Problems with State-of-the-art Deep Learning
 
AWS 機器學習 II ─ 深度學習 Deep Learning & MXNet
AWS 機器學習 II ─ 深度學習 Deep Learning & MXNetAWS 機器學習 II ─ 深度學習 Deep Learning & MXNet
AWS 機器學習 II ─ 深度學習 Deep Learning & MXNet
 
Learning Predictive Modeling with TSA and Kaggle
Learning Predictive Modeling with TSA and KaggleLearning Predictive Modeling with TSA and Kaggle
Learning Predictive Modeling with TSA and Kaggle
 
IgniteATL - Hackintoshing
IgniteATL - HackintoshingIgniteATL - Hackintoshing
IgniteATL - Hackintoshing
 
Alex Smola at AI Frontiers: Scalable Deep Learning Using MXNet
Alex Smola at AI Frontiers: Scalable Deep Learning Using MXNetAlex Smola at AI Frontiers: Scalable Deep Learning Using MXNet
Alex Smola at AI Frontiers: Scalable Deep Learning Using MXNet
 
Viktor Tsykunov "Microsoft AI platform for every Developer"
Viktor Tsykunov "Microsoft AI platform for every Developer"Viktor Tsykunov "Microsoft AI platform for every Developer"
Viktor Tsykunov "Microsoft AI platform for every Developer"
 
Keras on tensorflow in R & Python
Keras on tensorflow in R & PythonKeras on tensorflow in R & Python
Keras on tensorflow in R & Python
 
Power ai tensorflowworkloadtutorial-20171117
Power ai tensorflowworkloadtutorial-20171117Power ai tensorflowworkloadtutorial-20171117
Power ai tensorflowworkloadtutorial-20171117
 
RunX ELCE 2020
RunX ELCE 2020RunX ELCE 2020
RunX ELCE 2020
 
Building a Better TSA Screening Algorithm
Building a Better TSA Screening AlgorithmBuilding a Better TSA Screening Algorithm
Building a Better TSA Screening Algorithm
 
Structure Unstructured Data
Structure Unstructured DataStructure Unstructured Data
Structure Unstructured Data
 
[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용
[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용
[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용
 

More from Empatika

More from Empatika (20)

Gamification 101 - Intro
Gamification 101 - IntroGamification 101 - Intro
Gamification 101 - Intro
 
Travel 101 - On Distribution
Travel 101 - On DistributionTravel 101 - On Distribution
Travel 101 - On Distribution
 
Travel Tech 101 - Introduction
Travel Tech 101 - IntroductionTravel Tech 101 - Introduction
Travel Tech 101 - Introduction
 
Subscriptions business model - FAQ
Subscriptions business model - FAQSubscriptions business model - FAQ
Subscriptions business model - FAQ
 
Theories of Innovation
Theories of InnovationTheories of Innovation
Theories of Innovation
 
Lessons learned & not learned at MSU
Lessons learned & not learned at MSULessons learned & not learned at MSU
Lessons learned & not learned at MSU
 
Disruptive Innovations
Disruptive InnovationsDisruptive Innovations
Disruptive Innovations
 
US Commercial Aviation History - 1
US Commercial Aviation History - 1US Commercial Aviation History - 1
US Commercial Aviation History - 1
 
Life in a startup
Life in a startupLife in a startup
Life in a startup
 
Machine Learning - Empatika Open
Machine Learning - Empatika OpenMachine Learning - Empatika Open
Machine Learning - Empatika Open
 
Online Travel 3.0 - Mobile Traveler (Rus)
Online Travel 3.0 - Mobile Traveler (Rus)Online Travel 3.0 - Mobile Traveler (Rus)
Online Travel 3.0 - Mobile Traveler (Rus)
 
Flight to 1000000 users - Lviv IT Arena 2016
Flight to 1000000 users - Lviv IT Arena 2016Flight to 1000000 users - Lviv IT Arena 2016
Flight to 1000000 users - Lviv IT Arena 2016
 
Travel inequality - Bayram Annakov
Travel inequality - Bayram AnnakovTravel inequality - Bayram Annakov
Travel inequality - Bayram Annakov
 
App in the Air Travel Hack Moscow - Fall, 2015
App in the Air Travel Hack Moscow - Fall, 2015App in the Air Travel Hack Moscow - Fall, 2015
App in the Air Travel Hack Moscow - Fall, 2015
 
Intro to Exponentials - Part 1
Intro to Exponentials - Part 1Intro to Exponentials - Part 1
Intro to Exponentials - Part 1
 
Review: Google I/O 2015 Building context aware apps
Review: Google I/O 2015 Building context aware appsReview: Google I/O 2015 Building context aware apps
Review: Google I/O 2015 Building context aware apps
 
Going global producthunt
Going global producthuntGoing global producthunt
Going global producthunt
 
Мобильные приложения - тренды и экосистема
Мобильные приложения - тренды и экосистемаМобильные приложения - тренды и экосистема
Мобильные приложения - тренды и экосистема
 
Mobile app growth - 3 essential feedback loops
Mobile app growth - 3 essential feedback loopsMobile app growth - 3 essential feedback loops
Mobile app growth - 3 essential feedback loops
 
Apple Watch Overview
Apple Watch OverviewApple Watch Overview
Apple Watch Overview
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Machine learning 2 - Neural Networks