SlideShare uma empresa Scribd logo
1 de 40
Baixar para ler offline
ConvNetJS & CaffeJS
Deep Learning in the Browser
Christoph KĂśrner
Slides available on bit.ly/294OFxk 1
About me
• Visual Computing at Vienna University of Technology
• Intern in the Big Data Team at T-Mobile Austria
• Author of Data Visualizations with D3 and AngularJS
• Author of Learning Responsive Data Visualization
• Contributor at n3-line-chart
• Organizer of Vienna Kaggle Meetup
• LinkedIn: at.linkedin.com/in/christophkoerner
• Twitter: @ChrisiKrnr
• Google+: +ChrisiHififm
• Github: github.com/chaosmail
2
Agenda
• Deep Learning
• ConvNetJS
• CaffeJS
• Whats next
3
Deep Learning (in 5 min)
4
Image Classification
5Source: CS231n Github
Spatial Localization and Detection
6Source: CS231n Lecture Notes
General: Regression
7Source: CS UBC
Example
8Source: CS231n Github
Neural Nets: Ingredients
9
• Linear Classification
• Non-linearities (Activation functions)
• Compute Error Loss
• Optimization (Back-propagation)
Linear Classifier y = Wx + b
10Source: CS231n Github
Non-linearities (Activation functions)
11Source: deepdish.io
• Needed for building universal approximators
Compute the Error (Loss)
12Source: Udacity Tensorflow, Interactive Demo
Optimization (1)
13Source: CS231n Github
Optimization (2)
14Source: lmjohns3.com
Neural Network
15Source: CS231n Github
Deep Neural Nets: Ingredients
16
• Convolution of Volumes
• Pooling
• Many layers, many parameters, much fun
Convolutions
17Source: CS231n Github
Pooling
18Source: CS231n Github
Many Layers, AlexNet
19Source: ImageNet Classification with Deep Convolutional Neural Networks
And more Layers, GoogLeNet
20Source: Going deeper with convolutions, Great Slides
And More Layers, VGG vs. ResNet
21Source: Deep Residual Learning for Image Recognition
ConvNetJS
22Source: Github by Andrej Karpathy
Convolutional Neural Nets in the Browser
• Network and Layers
○ including Conv, Pool, etc.
• Network Training
○ Including SGD, momentum, etc.
• Visualization of Activations
• JSON import and export
• Cool demos: MNIST Train, CIFAR Train, CIFAR
23Source: ConvNetJS
ConvNetJS Layers
• Input
• Inner Product:
○ FC, Conv
• Pool (only max pool)
• Dropout
• Normalization:
○ LRN
• Loss:
○ Softmax, Regression, SVM
• Non-linearities:
○ ReLU, Sigmoid, Maxout, Tanh,
24
ConvNetJS Training
• Optimization methods:
○ SGD
○ Adam
○ Adadelta
○ Adagrad
○ Nestrov momentum
25
convnetjs.Net
• Layers stored as Arrays
○ Net.layers
• Forward and Backward pass
○ Net.forward(vol)
○ Net.backward(y)
• Import & Export
○ Net.toJSON
○ Net.fromJSON
26
convnetjs.Layer
• Layer dimensions
○ Layer.out_sx
○ Layer.out_sy
○ Layer.out_depth
• Forward and Backward pass
○ Layer.forward(vol)
○ Layer.backward(y)
• Stores last volumes
○ Layer.in_act
○ Layer.out_act
27
convnetjs.Vol
• Volumes stored as Typed Arrays (column vectors)
○ Vol.get(x, y, d)
○ Vol.set(x, y, d, value)
• Dimensions
○ Vol.sx
○ Vol.sy
○ Vol.depth
• Weights and Gradients
○ Vol.w
○ Vol.dw
28
• Float32Array, Float64Array, …
• Typed arrays are fast for storing large blobs
• Plays nicely with ArrayBuffer
29
Array Float64Array Float32Array
Create zero filled 0.624 0.266 0.139
Fill iter. / method 0.228 0.228 / 0.817 0.270 / 0.954
Copy array 5.425 0.050 0.024
Typed Arrays
• Slow, due to sequential computation
• Array layer structure (no Inception modules)
• No Recurrent Networks
• Inefficient Dropout and activations
• Limited memory in the browser, JSON
• I don’t want to train models in the browser
Problems of ConvNetJS
30
• Offline training (many GPUs, long time)
• Export weights
• Perform only forward pass (no BP needed)
Using pre-trained Models
31
Finding pre-trained Models
• Popular pre-trained models are available
○ Caffe
○ Model-Zoo
○ FCN Berkley Vision
• Structure in ProtoBuf files *.prototxt
• Weights in binary files *.caffemodel
32
CaffeJS - Caffe Models in the Browser
• Work in progress…
• Based on ConvNetJS
• Transforms *.caffemodel weights into bin files
(one file per layer) - Thanks to #1669 in Keras
• Updates weights in ConvNetJS models
33
CaffeJS - Caffe Models in the Browser
• Graph structure for layers + layerIterator
• Abstractions for Visualizations
• New Layers (Concat, AVG Pool, etc.)
34
• Visualize models and structure
• Demo using Webcam and DNN
• DeepDream ported to JS
Demos with CaffeJS
35
• Teaching & Learning
○ No requirements (but a browser)
○ Understand & analyze Deep Nets
○ Debugging of Deep Nets (FF and BP)
○ Visualize the filters, layers, activations, etc.
○ Feed webcam stream into Deep Nets
Why CaffeJS
36
• Forward pass still slow
○ 6s for GoogLeNet
○ Most time spend in early convolutions
• Too much overhead for weights (fc6 and fc7)
• Uses only layers, no blobs
• Memory issues (above 200MB) - can we convert
weights into images?
Problems of CaffeJS
37
Whats next
• Network in a Network (NIN)
• Fully Convolutional Nets (FCN)
• WebCL: Heterogeneous parallel computing
• WebAssembly: Compilation to the web
• Deep Compression: AlexNet on 7MB
• More Layers!
38
Some more useful resources
• Tensorflow Playground: Neural Nets
• CS231n: Lecture, Github, and videos
• CS231n: Caffe Tutorial
• Udacity Tensorflow
• DeepDream
39
Thank you.
40

Mais conteĂşdo relacionado

Mais procurados

Apache Cassandra Lunch #67: Moving Data from Cassandra to Datastax Astra
Apache Cassandra Lunch #67: Moving Data from Cassandra to Datastax AstraApache Cassandra Lunch #67: Moving Data from Cassandra to Datastax Astra
Apache Cassandra Lunch #67: Moving Data from Cassandra to Datastax AstraAnant Corporation
 
mypipe: Buffering and consuming MySQL changes via Kafka
mypipe: Buffering and consuming MySQL changes via Kafkamypipe: Buffering and consuming MySQL changes via Kafka
mypipe: Buffering and consuming MySQL changes via KafkaHisham Mardam-Bey
 
Rust in TiKV
Rust in TiKVRust in TiKV
Rust in TiKVPingCAP
 
TiDB for Big Data
TiDB for Big DataTiDB for Big Data
TiDB for Big DataPingCAP
 
A Brief Introduction of TiDB (Percona Live)
A Brief Introduction of TiDB (Percona Live)A Brief Introduction of TiDB (Percona Live)
A Brief Introduction of TiDB (Percona Live)PingCAP
 
Activity feeds (and more) at mate1
Activity feeds (and more) at mate1Activity feeds (and more) at mate1
Activity feeds (and more) at mate1Hisham Mardam-Bey
 
Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)
Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)
Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)Minh Dao
 
How to build TiDB
How to build TiDBHow to build TiDB
How to build TiDBPingCAP
 
Atmosphere 2018: Wojciech Krysmann- INFRA AS CODE - TERRAFORM DEEP DIVE AND B...
Atmosphere 2018: Wojciech Krysmann- INFRA AS CODE - TERRAFORM DEEP DIVE AND B...Atmosphere 2018: Wojciech Krysmann- INFRA AS CODE - TERRAFORM DEEP DIVE AND B...
Atmosphere 2018: Wojciech Krysmann- INFRA AS CODE - TERRAFORM DEEP DIVE AND B...PROIDEA
 
Cassandra Lunch #59 Functions in Cassandra
Cassandra Lunch #59  Functions in CassandraCassandra Lunch #59  Functions in Cassandra
Cassandra Lunch #59 Functions in CassandraAnant Corporation
 
TiDB as an HTAP Database
TiDB as an HTAP DatabaseTiDB as an HTAP Database
TiDB as an HTAP DatabasePingCAP
 
.NET Memory Primer (Martin Kulov)
.NET Memory Primer (Martin Kulov).NET Memory Primer (Martin Kulov)
.NET Memory Primer (Martin Kulov)ITCamp
 
Concourse ci container based ci for the cloud
Concourse ci   container based ci for the cloudConcourse ci   container based ci for the cloud
Concourse ci container based ci for the cloudJohannes Rudolph
 
TiDB Introduction
TiDB IntroductionTiDB Introduction
TiDB IntroductionMorgan Tocker
 
Building a transactional key-value store that scales to 100+ nodes (percona l...
Building a transactional key-value store that scales to 100+ nodes (percona l...Building a transactional key-value store that scales to 100+ nodes (percona l...
Building a transactional key-value store that scales to 100+ nodes (percona l...PingCAP
 
Scale Relational Database with NewSQL
Scale Relational Database with NewSQLScale Relational Database with NewSQL
Scale Relational Database with NewSQLPingCAP
 
Strings, C# and Unmanaged Memory
Strings, C# and Unmanaged MemoryStrings, C# and Unmanaged Memory
Strings, C# and Unmanaged MemoryMichael Yarichuk
 

Mais procurados (19)

Apache Cassandra Lunch #67: Moving Data from Cassandra to Datastax Astra
Apache Cassandra Lunch #67: Moving Data from Cassandra to Datastax AstraApache Cassandra Lunch #67: Moving Data from Cassandra to Datastax Astra
Apache Cassandra Lunch #67: Moving Data from Cassandra to Datastax Astra
 
mypipe: Buffering and consuming MySQL changes via Kafka
mypipe: Buffering and consuming MySQL changes via Kafkamypipe: Buffering and consuming MySQL changes via Kafka
mypipe: Buffering and consuming MySQL changes via Kafka
 
Rust in TiKV
Rust in TiKVRust in TiKV
Rust in TiKV
 
TiDB for Big Data
TiDB for Big DataTiDB for Big Data
TiDB for Big Data
 
Cimagraphi8
Cimagraphi8Cimagraphi8
Cimagraphi8
 
A Brief Introduction of TiDB (Percona Live)
A Brief Introduction of TiDB (Percona Live)A Brief Introduction of TiDB (Percona Live)
A Brief Introduction of TiDB (Percona Live)
 
Case Study
Case Study Case Study
Case Study
 
Activity feeds (and more) at mate1
Activity feeds (and more) at mate1Activity feeds (and more) at mate1
Activity feeds (and more) at mate1
 
Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)
Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)
Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)
 
How to build TiDB
How to build TiDBHow to build TiDB
How to build TiDB
 
Atmosphere 2018: Wojciech Krysmann- INFRA AS CODE - TERRAFORM DEEP DIVE AND B...
Atmosphere 2018: Wojciech Krysmann- INFRA AS CODE - TERRAFORM DEEP DIVE AND B...Atmosphere 2018: Wojciech Krysmann- INFRA AS CODE - TERRAFORM DEEP DIVE AND B...
Atmosphere 2018: Wojciech Krysmann- INFRA AS CODE - TERRAFORM DEEP DIVE AND B...
 
Cassandra Lunch #59 Functions in Cassandra
Cassandra Lunch #59  Functions in CassandraCassandra Lunch #59  Functions in Cassandra
Cassandra Lunch #59 Functions in Cassandra
 
TiDB as an HTAP Database
TiDB as an HTAP DatabaseTiDB as an HTAP Database
TiDB as an HTAP Database
 
.NET Memory Primer (Martin Kulov)
.NET Memory Primer (Martin Kulov).NET Memory Primer (Martin Kulov)
.NET Memory Primer (Martin Kulov)
 
Concourse ci container based ci for the cloud
Concourse ci   container based ci for the cloudConcourse ci   container based ci for the cloud
Concourse ci container based ci for the cloud
 
TiDB Introduction
TiDB IntroductionTiDB Introduction
TiDB Introduction
 
Building a transactional key-value store that scales to 100+ nodes (percona l...
Building a transactional key-value store that scales to 100+ nodes (percona l...Building a transactional key-value store that scales to 100+ nodes (percona l...
Building a transactional key-value store that scales to 100+ nodes (percona l...
 
Scale Relational Database with NewSQL
Scale Relational Database with NewSQLScale Relational Database with NewSQL
Scale Relational Database with NewSQL
 
Strings, C# and Unmanaged Memory
Strings, C# and Unmanaged MemoryStrings, C# and Unmanaged Memory
Strings, C# and Unmanaged Memory
 

Destaque

Deep Learning in iOS Tutorial
Deep Learning in iOS TutorialDeep Learning in iOS Tutorial
Deep Learning in iOS TutorialAnyline
 
Text Detection Strategies
Text Detection StrategiesText Detection Strategies
Text Detection StrategiesAnyline
 
A Mobile Recognition System for Analog Energy Meter Scanning
A Mobile Recognition System for Analog Energy Meter ScanningA Mobile Recognition System for Analog Energy Meter Scanning
A Mobile Recognition System for Analog Energy Meter ScanningAnyline
 
HoloLens Introduction and Technical Specifications
HoloLens Introduction and Technical SpecificationsHoloLens Introduction and Technical Specifications
HoloLens Introduction and Technical SpecificationsAnyline
 
Introduction to graphs and their ability to represent images
Introduction to graphs and their ability to represent imagesIntroduction to graphs and their ability to represent images
Introduction to graphs and their ability to represent imagesAnyline
 
Fields of application for working with smart glasses
Fields of application for working with smart glassesFields of application for working with smart glasses
Fields of application for working with smart glassesAnyline
 
Microsoft Cognitive Services
Microsoft Cognitive ServicesMicrosoft Cognitive Services
Microsoft Cognitive ServicesAnyline
 
Low-end Android cameras and the exposure triangle
Low-end Android cameras and the exposure triangleLow-end Android cameras and the exposure triangle
Low-end Android cameras and the exposure triangleAnyline
 
Inexact reasoning
Inexact reasoningInexact reasoning
Inexact reasoningNirdesh Singh
 
Python libraries for Deep Learning with Sequences
Python libraries for Deep Learning with SequencesPython libraries for Deep Learning with Sequences
Python libraries for Deep Learning with SequencesAlex Rubinsteyn
 
Paper overview: "Deep Residual Learning for Image Recognition"
Paper overview: "Deep Residual Learning for Image Recognition"Paper overview: "Deep Residual Learning for Image Recognition"
Paper overview: "Deep Residual Learning for Image Recognition"Ilya Kuzovkin
 
Multisensor Data Fusion : Techno Briefing
Multisensor Data Fusion : Techno BriefingMultisensor Data Fusion : Techno Briefing
Multisensor Data Fusion : Techno BriefingPaveen Juntama
 
Optical character recognition of handwritten Arabic using hidden Markov models
Optical character recognition of handwritten Arabic using hidden Markov modelsOptical character recognition of handwritten Arabic using hidden Markov models
Optical character recognition of handwritten Arabic using hidden Markov modelsMuhannad Aulama
 
Deep Learning And Business Models (VNITC 2015-09-13)
Deep Learning And Business Models (VNITC 2015-09-13)Deep Learning And Business Models (VNITC 2015-09-13)
Deep Learning And Business Models (VNITC 2015-09-13)Ha Phuong
 
General Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsGeneral Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsMark Peng
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net frameworkArun Prasad
 

Destaque (18)

Deep Learning in iOS Tutorial
Deep Learning in iOS TutorialDeep Learning in iOS Tutorial
Deep Learning in iOS Tutorial
 
Text Detection Strategies
Text Detection StrategiesText Detection Strategies
Text Detection Strategies
 
A Mobile Recognition System for Analog Energy Meter Scanning
A Mobile Recognition System for Analog Energy Meter ScanningA Mobile Recognition System for Analog Energy Meter Scanning
A Mobile Recognition System for Analog Energy Meter Scanning
 
HoloLens Introduction and Technical Specifications
HoloLens Introduction and Technical SpecificationsHoloLens Introduction and Technical Specifications
HoloLens Introduction and Technical Specifications
 
Introduction to graphs and their ability to represent images
Introduction to graphs and their ability to represent imagesIntroduction to graphs and their ability to represent images
Introduction to graphs and their ability to represent images
 
Fields of application for working with smart glasses
Fields of application for working with smart glassesFields of application for working with smart glasses
Fields of application for working with smart glasses
 
Microsoft Cognitive Services
Microsoft Cognitive ServicesMicrosoft Cognitive Services
Microsoft Cognitive Services
 
Low-end Android cameras and the exposure triangle
Low-end Android cameras and the exposure triangleLow-end Android cameras and the exposure triangle
Low-end Android cameras and the exposure triangle
 
Inexact reasoning
Inexact reasoningInexact reasoning
Inexact reasoning
 
Multiple Classifier Systems
Multiple Classifier SystemsMultiple Classifier Systems
Multiple Classifier Systems
 
Python libraries for Deep Learning with Sequences
Python libraries for Deep Learning with SequencesPython libraries for Deep Learning with Sequences
Python libraries for Deep Learning with Sequences
 
Paper overview: "Deep Residual Learning for Image Recognition"
Paper overview: "Deep Residual Learning for Image Recognition"Paper overview: "Deep Residual Learning for Image Recognition"
Paper overview: "Deep Residual Learning for Image Recognition"
 
Multisensor Data Fusion : Techno Briefing
Multisensor Data Fusion : Techno BriefingMultisensor Data Fusion : Techno Briefing
Multisensor Data Fusion : Techno Briefing
 
Optical character recognition of handwritten Arabic using hidden Markov models
Optical character recognition of handwritten Arabic using hidden Markov modelsOptical character recognition of handwritten Arabic using hidden Markov models
Optical character recognition of handwritten Arabic using hidden Markov models
 
Deep Learning And Business Models (VNITC 2015-09-13)
Deep Learning And Business Models (VNITC 2015-09-13)Deep Learning And Business Models (VNITC 2015-09-13)
Deep Learning And Business Models (VNITC 2015-09-13)
 
Group Actions
Group ActionsGroup Actions
Group Actions
 
General Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsGeneral Tips for participating Kaggle Competitions
General Tips for participating Kaggle Competitions
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 

Semelhante a ConvNetJS & CaffeJS

LesFurets.com: From 0 to Cassandra on AWS in 30 days - Tsunami Alerting Syste...
LesFurets.com: From 0 to Cassandra on AWS in 30 days - Tsunami Alerting Syste...LesFurets.com: From 0 to Cassandra on AWS in 30 days - Tsunami Alerting Syste...
LesFurets.com: From 0 to Cassandra on AWS in 30 days - Tsunami Alerting Syste...DataStax Academy
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Daosheng Mu
 
Image style transfer & AI on App
Image style transfer & AI on AppImage style transfer & AI on App
Image style transfer & AI on AppChihyang Li
 
Image style transfer and iOS CoreML, Vision Frameworks
Image style transfer and iOS CoreML, Vision FrameworksImage style transfer and iOS CoreML, Vision Frameworks
Image style transfer and iOS CoreML, Vision FrameworksChihyang Li
 
Big Data Day LA 2015 - Spark after Dark by Chris Fregly of Databricks
Big Data Day LA 2015 - Spark after Dark by Chris Fregly of DatabricksBig Data Day LA 2015 - Spark after Dark by Chris Fregly of Databricks
Big Data Day LA 2015 - Spark after Dark by Chris Fregly of DatabricksData Con LA
 
IMCSummit 2015 - Day 1 Developer Track - Spark After Dark: Generating High Qu...
IMCSummit 2015 - Day 1 Developer Track - Spark After Dark: Generating High Qu...IMCSummit 2015 - Day 1 Developer Track - Spark After Dark: Generating High Qu...
IMCSummit 2015 - Day 1 Developer Track - Spark After Dark: Generating High Qu...In-Memory Computing Summit
 
Collecting 600M events/day
Collecting 600M events/dayCollecting 600M events/day
Collecting 600M events/dayLars Marius Garshol
 
OSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica SarbuOSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica SarbuNETWAYS
 
OSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica SarbuOSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica SarbuNETWAYS
 
Deep_Learning_Frameworks_CNTK_PyTorch
Deep_Learning_Frameworks_CNTK_PyTorchDeep_Learning_Frameworks_CNTK_PyTorch
Deep_Learning_Frameworks_CNTK_PyTorchSubhashis Hazarika
 
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca AntigaServing Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca AntigaRedis Labs
 
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the DatacenterKubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the DatacenterKevin Lynch
 
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!Teamstudio
 
[DLHacks]Introduction to ChainerCV
[DLHacks]Introduction to ChainerCV[DLHacks]Introduction to ChainerCV
[DLHacks]Introduction to ChainerCVDeep Learning JP
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOpsSveta Smirnova
 
containerd and CRI
containerd and CRIcontainerd and CRI
containerd and CRIDocker, Inc.
 
Node and Azure
Node and AzureNode and Azure
Node and AzureJason Gerard
 
End to-end example: consumer loan acceptance scoring using kubeflow
End to-end example: consumer loan acceptance scoring using kubeflowEnd to-end example: consumer loan acceptance scoring using kubeflow
End to-end example: consumer loan acceptance scoring using kubeflowRadovan Parrak
 
150807 Fast R-CNN
150807 Fast R-CNN150807 Fast R-CNN
150807 Fast R-CNNJunho Cho
 
Meetup#2: Building responsive Symbology & Suggest WebService
Meetup#2: Building responsive Symbology & Suggest WebServiceMeetup#2: Building responsive Symbology & Suggest WebService
Meetup#2: Building responsive Symbology & Suggest WebServiceMinsk MongoDB User Group
 

Semelhante a ConvNetJS & CaffeJS (20)

LesFurets.com: From 0 to Cassandra on AWS in 30 days - Tsunami Alerting Syste...
LesFurets.com: From 0 to Cassandra on AWS in 30 days - Tsunami Alerting Syste...LesFurets.com: From 0 to Cassandra on AWS in 30 days - Tsunami Alerting Syste...
LesFurets.com: From 0 to Cassandra on AWS in 30 days - Tsunami Alerting Syste...
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
 
Image style transfer & AI on App
Image style transfer & AI on AppImage style transfer & AI on App
Image style transfer & AI on App
 
Image style transfer and iOS CoreML, Vision Frameworks
Image style transfer and iOS CoreML, Vision FrameworksImage style transfer and iOS CoreML, Vision Frameworks
Image style transfer and iOS CoreML, Vision Frameworks
 
Big Data Day LA 2015 - Spark after Dark by Chris Fregly of Databricks
Big Data Day LA 2015 - Spark after Dark by Chris Fregly of DatabricksBig Data Day LA 2015 - Spark after Dark by Chris Fregly of Databricks
Big Data Day LA 2015 - Spark after Dark by Chris Fregly of Databricks
 
IMCSummit 2015 - Day 1 Developer Track - Spark After Dark: Generating High Qu...
IMCSummit 2015 - Day 1 Developer Track - Spark After Dark: Generating High Qu...IMCSummit 2015 - Day 1 Developer Track - Spark After Dark: Generating High Qu...
IMCSummit 2015 - Day 1 Developer Track - Spark After Dark: Generating High Qu...
 
Collecting 600M events/day
Collecting 600M events/dayCollecting 600M events/day
Collecting 600M events/day
 
OSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica SarbuOSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica Sarbu
 
OSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica SarbuOSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica Sarbu
 
Deep_Learning_Frameworks_CNTK_PyTorch
Deep_Learning_Frameworks_CNTK_PyTorchDeep_Learning_Frameworks_CNTK_PyTorch
Deep_Learning_Frameworks_CNTK_PyTorch
 
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca AntigaServing Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
 
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the DatacenterKubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the Datacenter
 
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
 
[DLHacks]Introduction to ChainerCV
[DLHacks]Introduction to ChainerCV[DLHacks]Introduction to ChainerCV
[DLHacks]Introduction to ChainerCV
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
 
containerd and CRI
containerd and CRIcontainerd and CRI
containerd and CRI
 
Node and Azure
Node and AzureNode and Azure
Node and Azure
 
End to-end example: consumer loan acceptance scoring using kubeflow
End to-end example: consumer loan acceptance scoring using kubeflowEnd to-end example: consumer loan acceptance scoring using kubeflow
End to-end example: consumer loan acceptance scoring using kubeflow
 
150807 Fast R-CNN
150807 Fast R-CNN150807 Fast R-CNN
150807 Fast R-CNN
 
Meetup#2: Building responsive Symbology & Suggest WebService
Meetup#2: Building responsive Symbology & Suggest WebServiceMeetup#2: Building responsive Symbology & Suggest WebService
Meetup#2: Building responsive Symbology & Suggest WebService
 

Último

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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 2024Rafal Los
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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 WorkerThousandEyes
 
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.pdfUK Journal
 
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 TerraformAndrey Devyatkin
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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 2024The Digital Insurer
 
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...Miguel AraĂşjo
 
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, Adobeapidays
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
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 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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)wesley chun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 

Último (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
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
 
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
 
+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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
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...
 
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
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 

ConvNetJS & CaffeJS

  • 1. ConvNetJS & CaffeJS Deep Learning in the Browser Christoph KĂśrner Slides available on bit.ly/294OFxk 1
  • 2. About me • Visual Computing at Vienna University of Technology • Intern in the Big Data Team at T-Mobile Austria • Author of Data Visualizations with D3 and AngularJS • Author of Learning Responsive Data Visualization • Contributor at n3-line-chart • Organizer of Vienna Kaggle Meetup • LinkedIn: at.linkedin.com/in/christophkoerner • Twitter: @ChrisiKrnr • Google+: +ChrisiHififm • Github: github.com/chaosmail 2
  • 3. Agenda • Deep Learning • ConvNetJS • CaffeJS • Whats next 3
  • 4. Deep Learning (in 5 min) 4
  • 6. Spatial Localization and Detection 6Source: CS231n Lecture Notes
  • 9. Neural Nets: Ingredients 9 • Linear Classification • Non-linearities (Activation functions) • Compute Error Loss • Optimization (Back-propagation)
  • 10. Linear Classifier y = Wx + b 10Source: CS231n Github
  • 11. Non-linearities (Activation functions) 11Source: deepdish.io • Needed for building universal approximators
  • 12. Compute the Error (Loss) 12Source: Udacity Tensorflow, Interactive Demo
  • 16. Deep Neural Nets: Ingredients 16 • Convolution of Volumes • Pooling • Many layers, many parameters, much fun
  • 19. Many Layers, AlexNet 19Source: ImageNet Classification with Deep Convolutional Neural Networks
  • 20. And more Layers, GoogLeNet 20Source: Going deeper with convolutions, Great Slides
  • 21. And More Layers, VGG vs. ResNet 21Source: Deep Residual Learning for Image Recognition
  • 22. ConvNetJS 22Source: Github by Andrej Karpathy
  • 23. Convolutional Neural Nets in the Browser • Network and Layers ○ including Conv, Pool, etc. • Network Training ○ Including SGD, momentum, etc. • Visualization of Activations • JSON import and export • Cool demos: MNIST Train, CIFAR Train, CIFAR 23Source: ConvNetJS
  • 24. ConvNetJS Layers • Input • Inner Product: ○ FC, Conv • Pool (only max pool) • Dropout • Normalization: ○ LRN • Loss: ○ Softmax, Regression, SVM • Non-linearities: ○ ReLU, Sigmoid, Maxout, Tanh, 24
  • 25. ConvNetJS Training • Optimization methods: ○ SGD ○ Adam ○ Adadelta ○ Adagrad ○ Nestrov momentum 25
  • 26. convnetjs.Net • Layers stored as Arrays ○ Net.layers • Forward and Backward pass ○ Net.forward(vol) ○ Net.backward(y) • Import & Export ○ Net.toJSON ○ Net.fromJSON 26
  • 27. convnetjs.Layer • Layer dimensions ○ Layer.out_sx ○ Layer.out_sy ○ Layer.out_depth • Forward and Backward pass ○ Layer.forward(vol) ○ Layer.backward(y) • Stores last volumes ○ Layer.in_act ○ Layer.out_act 27
  • 28. convnetjs.Vol • Volumes stored as Typed Arrays (column vectors) ○ Vol.get(x, y, d) ○ Vol.set(x, y, d, value) • Dimensions ○ Vol.sx ○ Vol.sy ○ Vol.depth • Weights and Gradients ○ Vol.w ○ Vol.dw 28
  • 29. • Float32Array, Float64Array, … • Typed arrays are fast for storing large blobs • Plays nicely with ArrayBuffer 29 Array Float64Array Float32Array Create zero filled 0.624 0.266 0.139 Fill iter. / method 0.228 0.228 / 0.817 0.270 / 0.954 Copy array 5.425 0.050 0.024 Typed Arrays
  • 30. • Slow, due to sequential computation • Array layer structure (no Inception modules) • No Recurrent Networks • Inefficient Dropout and activations • Limited memory in the browser, JSON • I don’t want to train models in the browser Problems of ConvNetJS 30
  • 31. • Offline training (many GPUs, long time) • Export weights • Perform only forward pass (no BP needed) Using pre-trained Models 31
  • 32. Finding pre-trained Models • Popular pre-trained models are available ○ Caffe ○ Model-Zoo ○ FCN Berkley Vision • Structure in ProtoBuf files *.prototxt • Weights in binary files *.caffemodel 32
  • 33. CaffeJS - Caffe Models in the Browser • Work in progress… • Based on ConvNetJS • Transforms *.caffemodel weights into bin files (one file per layer) - Thanks to #1669 in Keras • Updates weights in ConvNetJS models 33
  • 34. CaffeJS - Caffe Models in the Browser • Graph structure for layers + layerIterator • Abstractions for Visualizations • New Layers (Concat, AVG Pool, etc.) 34
  • 35. • Visualize models and structure • Demo using Webcam and DNN • DeepDream ported to JS Demos with CaffeJS 35
  • 36. • Teaching & Learning ○ No requirements (but a browser) ○ Understand & analyze Deep Nets ○ Debugging of Deep Nets (FF and BP) ○ Visualize the filters, layers, activations, etc. ○ Feed webcam stream into Deep Nets Why CaffeJS 36
  • 37. • Forward pass still slow ○ 6s for GoogLeNet ○ Most time spend in early convolutions • Too much overhead for weights (fc6 and fc7) • Uses only layers, no blobs • Memory issues (above 200MB) - can we convert weights into images? Problems of CaffeJS 37
  • 38. Whats next • Network in a Network (NIN) • Fully Convolutional Nets (FCN) • WebCL: Heterogeneous parallel computing • WebAssembly: Compilation to the web • Deep Compression: AlexNet on 7MB • More Layers! 38
  • 39. Some more useful resources • Tensorflow Playground: Neural Nets • CS231n: Lecture, Github, and videos • CS231n: Caffe Tutorial • Udacity Tensorflow • DeepDream 39