SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
 
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
 

La actualidad más candente (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
 

Destacado

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
 
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
 

Destacado (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
 

Similar 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
 
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.
 
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
 

Similar 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

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
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
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
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
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Último (20)

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
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
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
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
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

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