SlideShare a Scribd company logo
Distributed Deep Learning Using Java on the
Client and in the Cloud
Johan Vos, Gluon, @johanvos
https://gluonhq.com
What we will discuss
• Brief introduction in deep learning and how to do that in
Java using deeplearning4j.
• Client-side deep learning (on mobile) helps with privacy,
security and improves the model in the Cloud.
• Leverage Java deep learning algorithms in cross-
platform, performant and beautiful Java mobile apps.
My history
• MSc engineering, KULeuven, 1995
• PhD Applied Physics, TUDelft, 2000
• Data processing and visualization
• Involves
– Sensors, small devices
– HPC
– Visualisation
• Java
When science shops become mature, they turn into Java
shops
• Java works on large enterprise systems, with many
libraries available
• Java works with small devices and sensors
• Java has AI libraries
• Java has a REPL: Jshell
• IDE’s
• Mature language
• Security is a cornerstone
It’s similar
It’s similar
crack
cat
It’s similar
crack
cat
algebra
algebra
It’s similar
crack
detailed cat
algebra
algebra
Quantum computing
Software 2.0
Deep Learning
• A class of machine learning algorithms
• Can be supervised and unsupervised
• Raw input data (e.g. images, text, numbers) traverses a
number of layers, where the last layer typically is a
classification
• Resources: https://deeplearning4j.org/
deeplearningforbeginners.html
Deep Learning
Deeplearning4j
• https://deeplearning4j.org
• Java framework providing Deep Learning functionality
• Implementations use native mathematical libraries and
GPU (if available)
• Created by SkyMind
• Open-source at github
Learning about digits
• Mnist dataset
• 60,000 labeled training
images
• 10,000 labeled test images
• Supervised learning
About the code
• All code shown in this presentations is in
https://github.com/gluonhq/gluon-samples/tree/master/mnist
• Java standalone application to train model and make
predictions
• Server using Payara on Oracle Cloud
• Mobile app sending requests to cloud and making local
predictions
Train and evaluate network
• Retrieve mnist data (70,000 labeled images)
• Create a 2-layer neural network
• Train network with mnist data
• Evaluate quality (how much % of test images fails?)
• Make prediction with own data
Creating a Model for mnist
        MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()
                .optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT)
                .layer(0, new DenseLayer.Builder()
                        .nIn(height * width)
                        .nOut(100)
                        .activation(Activation.RELU)
                        .weightInit(WeightInit.XAVIER)
                        .build())
                .layer(1, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)
                        .nIn(100)
                        .nOut(outputNum)
                        .activation(Activation.SOFTMAX)
                        .weightInit(WeightInit.XAVIER)
                        .build())
                .backprop(true)
                .setInputType(InputType.convolutional(height, width, channels))
                .build();
Train Model
==================Confusion Matrix=========================
0 1 2 3 4 5 6 7 8 9
---------------------------------------------------
961 0 2 2 0 6 5 1 3 0 | 0 = 0
0 1113 2 2 0 1 4 2 11 0 | 1 = 1
8 8 908 18 9 3 14 14 45 5 | 2 = 2
2 1 15 929 0 29 2 12 14 6 | 3 = 3
1 4 5 1 917 0 9 2 6 37 | 4 = 4
9 4 3 26 9 794 10 5 24 8 | 5 = 5
11 3 4 1 15 19 899 2 4 0 | 6 = 6
2 11 23 7 5 1 0 948 3 28 | 7 = 7
7 6 6 22 8 16 10 10 881 8 | 8 = 8
10 7 1 12 40 11 0 21 4 903 | 9 = 9
Server setup
• Runs in every cloud or on premise
• 12 million Java developers can do this
Mobile client
• Java app, using JavaFX for UI
• Allow camera to take pictures, or select pictures from
gallery
• Send image to Cloud
• Cloud returns prediction
• Show prediction in the app
• If incorrect, ask user to provide correct result
• Send corrected result to server and retrain
Security
• Direct connections between Mobile devices and enterprise back-ends are
a security nightmare (for developers and operators) 

Gluon CloudLink
Gluon CloudLink
Dashboard
(https://gluon.io)
Backend
Application
Mobile Application
Public cloud
infrastructure
Cloud
Application Container
Cloud
Configuration
Storage DB
Monitor calls via Gluon CloudLink
Did we have permission to do this?
• Sending personal, raw data to cloud systems might be
sensitive.
• Pictures, locations, audio, video,… are all very relevant
input for AI and Deep Learning
• If users have to give permission for this, chances are they
will refuse.
Distributed Deep Learning
• Since we are using Java on the Client, we can run the
exact same code to use the model and to predictions
• Model is still retrieved from the server
• Predictions are made on client, using raw input data from
client
Quality concerns
• Supervised learning not possible anymore?
• We can do local training
• And synchronize model to server
Distributed Deep Learning
Client-side learning
• Retrain model on the (mobile) client.
– Synchronous
– At night
– Use raw user data to improve the local model
– Send new gradient (or delta with previous gradient) to server
Server-side update
• Accept changes from clients
– Merge weights in a smart way
– Send updated model to all clients
Conclusions
• Deep Learning algorithms provide many opportunities
• Java developers can use Deep Learning API’s
• Deep Learning applications run very well on Cloud systems
• Java Mobile applications can be used as clients for Deep
Learning cloud applications
• Java on Mobile allows to do more processing on the mobile
client, respecting user privacy and improving cloud model.
Thanks For Attending
Any Questions?
@johanvos
Johan.vos@gluonhq.com
@gluonhq
https://gluonhq.com
support@gluonhq.com

More Related Content

What's hot

Improving Hardware Efficiency for DNN Applications
Improving Hardware Efficiency for DNN ApplicationsImproving Hardware Efficiency for DNN Applications
Improving Hardware Efficiency for DNN ApplicationsChester Chen
 
Recent developments in Deep Learning
Recent developments in Deep LearningRecent developments in Deep Learning
Recent developments in Deep LearningBrahim HAMADICHAREF
 
Speeding up Deep Learning training and inference
Speeding up Deep Learning training and inferenceSpeeding up Deep Learning training and inference
Speeding up Deep Learning training and inferenceThomas Delteil
 
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...MLconf
 
Gpudigital lab for english partners
Gpudigital lab for english partnersGpudigital lab for english partners
Gpudigital lab for english partnersOleg Gubanov
 
Net campus2015 antimomusone
Net campus2015 antimomusoneNet campus2015 antimomusone
Net campus2015 antimomusoneDotNetCampus
 
NVIDIA 深度學習教育機構 (DLI): Approaches to object detection
NVIDIA 深度學習教育機構 (DLI): Approaches to object detectionNVIDIA 深度學習教育機構 (DLI): Approaches to object detection
NVIDIA 深度學習教育機構 (DLI): Approaches to object detectionNVIDIA Taiwan
 
“Modern Machine Vision from Basics to Advanced Deep Learning,” a Presentation...
“Modern Machine Vision from Basics to Advanced Deep Learning,” a Presentation...“Modern Machine Vision from Basics to Advanced Deep Learning,” a Presentation...
“Modern Machine Vision from Basics to Advanced Deep Learning,” a Presentation...Edge AI and Vision Alliance
 
STAR CCM GLOBAL CONFERENCE UBERCLOUD
STAR CCM GLOBAL CONFERENCE UBERCLOUDSTAR CCM GLOBAL CONFERENCE UBERCLOUD
STAR CCM GLOBAL CONFERENCE UBERCLOUDThomas Francis
 
Accelerate Machine Learning on Google Cloud
Accelerate Machine Learning on Google CloudAccelerate Machine Learning on Google Cloud
Accelerate Machine Learning on Google CloudSamantha Guerriero
 
Unsupervised Computer Vision: The Current State of the Art
Unsupervised Computer Vision: The Current State of the ArtUnsupervised Computer Vision: The Current State of the Art
Unsupervised Computer Vision: The Current State of the ArtTJ Torres
 
Microsoft Azure in HPC scenarios
Microsoft Azure in HPC scenariosMicrosoft Azure in HPC scenarios
Microsoft Azure in HPC scenariosmictc
 
AI powered emotion recognition: From Inception to Production - Global AI Conf...
AI powered emotion recognition: From Inception to Production - Global AI Conf...AI powered emotion recognition: From Inception to Production - Global AI Conf...
AI powered emotion recognition: From Inception to Production - Global AI Conf...Vandana Kannan
 
Nervana and the Future of Computing
Nervana and the Future of ComputingNervana and the Future of Computing
Nervana and the Future of ComputingIntel Nervana
 
“An Introduction to Data Augmentation Techniques in ML Frameworks,” a Present...
“An Introduction to Data Augmentation Techniques in ML Frameworks,” a Present...“An Introduction to Data Augmentation Techniques in ML Frameworks,” a Present...
“An Introduction to Data Augmentation Techniques in ML Frameworks,” a Present...Edge AI and Vision Alliance
 
Ultrasound nerve segmentation, kaggle review
Ultrasound nerve segmentation, kaggle reviewUltrasound nerve segmentation, kaggle review
Ultrasound nerve segmentation, kaggle reviewEduard Tyantov
 
Is ScalaC Getting Faster, or Am I just Imagining It
Is ScalaC Getting Faster, or Am I just Imagining ItIs ScalaC Getting Faster, or Am I just Imagining It
Is ScalaC Getting Faster, or Am I just Imagining ItRory Graves
 

What's hot (20)

Improving Hardware Efficiency for DNN Applications
Improving Hardware Efficiency for DNN ApplicationsImproving Hardware Efficiency for DNN Applications
Improving Hardware Efficiency for DNN Applications
 
Android and Deep Learning
Android and Deep LearningAndroid and Deep Learning
Android and Deep Learning
 
Recent developments in Deep Learning
Recent developments in Deep LearningRecent developments in Deep Learning
Recent developments in Deep Learning
 
Speeding up Deep Learning training and inference
Speeding up Deep Learning training and inferenceSpeeding up Deep Learning training and inference
Speeding up Deep Learning training and inference
 
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
 
Gpudigital lab for english partners
Gpudigital lab for english partnersGpudigital lab for english partners
Gpudigital lab for english partners
 
Net campus2015 antimomusone
Net campus2015 antimomusoneNet campus2015 antimomusone
Net campus2015 antimomusone
 
NVIDIA 深度學習教育機構 (DLI): Approaches to object detection
NVIDIA 深度學習教育機構 (DLI): Approaches to object detectionNVIDIA 深度學習教育機構 (DLI): Approaches to object detection
NVIDIA 深度學習教育機構 (DLI): Approaches to object detection
 
“Modern Machine Vision from Basics to Advanced Deep Learning,” a Presentation...
“Modern Machine Vision from Basics to Advanced Deep Learning,” a Presentation...“Modern Machine Vision from Basics to Advanced Deep Learning,” a Presentation...
“Modern Machine Vision from Basics to Advanced Deep Learning,” a Presentation...
 
STAR CCM GLOBAL CONFERENCE UBERCLOUD
STAR CCM GLOBAL CONFERENCE UBERCLOUDSTAR CCM GLOBAL CONFERENCE UBERCLOUD
STAR CCM GLOBAL CONFERENCE UBERCLOUD
 
Accelerate Machine Learning on Google Cloud
Accelerate Machine Learning on Google CloudAccelerate Machine Learning on Google Cloud
Accelerate Machine Learning on Google Cloud
 
Svm on cloud (presntation)
Svm on cloud  (presntation)Svm on cloud  (presntation)
Svm on cloud (presntation)
 
Unsupervised Computer Vision: The Current State of the Art
Unsupervised Computer Vision: The Current State of the ArtUnsupervised Computer Vision: The Current State of the Art
Unsupervised Computer Vision: The Current State of the Art
 
Microsoft Azure in HPC scenarios
Microsoft Azure in HPC scenariosMicrosoft Azure in HPC scenarios
Microsoft Azure in HPC scenarios
 
AI powered emotion recognition: From Inception to Production - Global AI Conf...
AI powered emotion recognition: From Inception to Production - Global AI Conf...AI powered emotion recognition: From Inception to Production - Global AI Conf...
AI powered emotion recognition: From Inception to Production - Global AI Conf...
 
Nervana and the Future of Computing
Nervana and the Future of ComputingNervana and the Future of Computing
Nervana and the Future of Computing
 
CNN Quantization
CNN QuantizationCNN Quantization
CNN Quantization
 
“An Introduction to Data Augmentation Techniques in ML Frameworks,” a Present...
“An Introduction to Data Augmentation Techniques in ML Frameworks,” a Present...“An Introduction to Data Augmentation Techniques in ML Frameworks,” a Present...
“An Introduction to Data Augmentation Techniques in ML Frameworks,” a Present...
 
Ultrasound nerve segmentation, kaggle review
Ultrasound nerve segmentation, kaggle reviewUltrasound nerve segmentation, kaggle review
Ultrasound nerve segmentation, kaggle review
 
Is ScalaC Getting Faster, or Am I just Imagining It
Is ScalaC Getting Faster, or Am I just Imagining ItIs ScalaC Getting Faster, or Am I just Imagining It
Is ScalaC Getting Faster, or Am I just Imagining It
 

Similar to Distributed Deep Learning Using Java on the Client and in the Cloud

Machine Learning Inference at the Edge
Machine Learning Inference at the EdgeMachine Learning Inference at the Edge
Machine Learning Inference at the EdgeAmazon Web Services
 
Viktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning ServiceViktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning ServiceLviv Startup Club
 
Machine Learning Inference at the Edge
Machine Learning Inference at the EdgeMachine Learning Inference at the Edge
Machine Learning Inference at the EdgeJulien SIMON
 
Machine Learning inference at the Edge
Machine Learning inference at the EdgeMachine Learning inference at the Edge
Machine Learning inference at the EdgeJulien SIMON
 
Transfer Learning (20230516)
Transfer Learning (20230516)Transfer Learning (20230516)
Transfer Learning (20230516)FEG
 
深度學習在AOI的應用
深度學習在AOI的應用深度學習在AOI的應用
深度學習在AOI的應用CHENHuiMei
 
Josh Patterson, Advisor, Skymind – Deep learning for Industry at MLconf ATL 2016
Josh Patterson, Advisor, Skymind – Deep learning for Industry at MLconf ATL 2016Josh Patterson, Advisor, Skymind – Deep learning for Industry at MLconf ATL 2016
Josh Patterson, Advisor, Skymind – Deep learning for Industry at MLconf ATL 2016MLconf
 
Deep Learning: DL4J and DataVec
Deep Learning: DL4J and DataVecDeep Learning: DL4J and DataVec
Deep Learning: DL4J and DataVecJosh Patterson
 
Emulating cisco network laboratory topologies in the cloud
Emulating cisco network laboratory topologies in the cloudEmulating cisco network laboratory topologies in the cloud
Emulating cisco network laboratory topologies in the cloudronan messi
 
Azure machine learning service
Azure machine learning serviceAzure machine learning service
Azure machine learning serviceRuth Yakubu
 
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakLearn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakPyData
 
Dog Breed Classification using PyTorch on Azure Machine Learning
Dog Breed Classification using PyTorch on Azure Machine LearningDog Breed Classification using PyTorch on Azure Machine Learning
Dog Breed Classification using PyTorch on Azure Machine LearningHeather Spetalnick
 
Parallel & Distributed Deep Learning - Dataworks Summit
Parallel & Distributed Deep Learning - Dataworks SummitParallel & Distributed Deep Learning - Dataworks Summit
Parallel & Distributed Deep Learning - Dataworks SummitRafael Arana
 
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...Daniel Bryant
 
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...Databricks
 
Unsupervised Aspect Based Sentiment Analysis at Scale
Unsupervised Aspect Based Sentiment Analysis at ScaleUnsupervised Aspect Based Sentiment Analysis at Scale
Unsupervised Aspect Based Sentiment Analysis at ScaleAaron (Ari) Bornstein
 
Smart Data Conference: DL4J and DataVec
Smart Data Conference: DL4J and DataVecSmart Data Conference: DL4J and DataVec
Smart Data Conference: DL4J and DataVecJosh Patterson
 

Similar to Distributed Deep Learning Using Java on the Client and in the Cloud (20)

Machine Learning Inference at the Edge
Machine Learning Inference at the EdgeMachine Learning Inference at the Edge
Machine Learning Inference at the Edge
 
Viktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning ServiceViktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning Service
 
Machine Learning Inference at the Edge
Machine Learning Inference at the EdgeMachine Learning Inference at the Edge
Machine Learning Inference at the Edge
 
Machine Learning inference at the Edge
Machine Learning inference at the EdgeMachine Learning inference at the Edge
Machine Learning inference at the Edge
 
Transfer Learning (20230516)
Transfer Learning (20230516)Transfer Learning (20230516)
Transfer Learning (20230516)
 
深度學習在AOI的應用
深度學習在AOI的應用深度學習在AOI的應用
深度學習在AOI的應用
 
Josh Patterson, Advisor, Skymind – Deep learning for Industry at MLconf ATL 2016
Josh Patterson, Advisor, Skymind – Deep learning for Industry at MLconf ATL 2016Josh Patterson, Advisor, Skymind – Deep learning for Industry at MLconf ATL 2016
Josh Patterson, Advisor, Skymind – Deep learning for Industry at MLconf ATL 2016
 
Deep Learning: DL4J and DataVec
Deep Learning: DL4J and DataVecDeep Learning: DL4J and DataVec
Deep Learning: DL4J and DataVec
 
Cloud computing
Cloud computing Cloud computing
Cloud computing
 
Deploying Models
Deploying ModelsDeploying Models
Deploying Models
 
Brad stack - Digital Health and Well-Being Festival
Brad stack - Digital Health and Well-Being Festival Brad stack - Digital Health and Well-Being Festival
Brad stack - Digital Health and Well-Being Festival
 
Emulating cisco network laboratory topologies in the cloud
Emulating cisco network laboratory topologies in the cloudEmulating cisco network laboratory topologies in the cloud
Emulating cisco network laboratory topologies in the cloud
 
Azure machine learning service
Azure machine learning serviceAzure machine learning service
Azure machine learning service
 
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakLearn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
 
Dog Breed Classification using PyTorch on Azure Machine Learning
Dog Breed Classification using PyTorch on Azure Machine LearningDog Breed Classification using PyTorch on Azure Machine Learning
Dog Breed Classification using PyTorch on Azure Machine Learning
 
Parallel & Distributed Deep Learning - Dataworks Summit
Parallel & Distributed Deep Learning - Dataworks SummitParallel & Distributed Deep Learning - Dataworks Summit
Parallel & Distributed Deep Learning - Dataworks Summit
 
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
 
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
 
Unsupervised Aspect Based Sentiment Analysis at Scale
Unsupervised Aspect Based Sentiment Analysis at ScaleUnsupervised Aspect Based Sentiment Analysis at Scale
Unsupervised Aspect Based Sentiment Analysis at Scale
 
Smart Data Conference: DL4J and DataVec
Smart Data Conference: DL4J and DataVecSmart Data Conference: DL4J and DataVec
Smart Data Conference: DL4J and DataVec
 

More from Data Science Leuven

Learning from positive and unlabeled data
Learning from positive and unlabeled dataLearning from positive and unlabeled data
Learning from positive and unlabeled dataData Science Leuven
 
Lighthouse - an open-source library to build data lakes - Kris Peeters
Lighthouse - an open-source library to build data lakes - Kris PeetersLighthouse - an open-source library to build data lakes - Kris Peeters
Lighthouse - an open-source library to build data lakes - Kris PeetersData Science Leuven
 
Recommender systems for job search - Michael Reusens
Recommender systems for job search - Michael ReusensRecommender systems for job search - Michael Reusens
Recommender systems for job search - Michael ReusensData Science Leuven
 
How to build a search engine in 2 days
How to build a search engine in 2 daysHow to build a search engine in 2 days
How to build a search engine in 2 daysData Science Leuven
 
Computing power and algorithms? In people we trust
Computing power and algorithms? In people we trustComputing power and algorithms? In people we trust
Computing power and algorithms? In people we trustData Science Leuven
 
Trumania , a realistic scenario-based data-generator
Trumania , a realistic scenario-based data-generatorTrumania , a realistic scenario-based data-generator
Trumania , a realistic scenario-based data-generatorData Science Leuven
 
Recommender systems, optimizing least squares or user experience
Recommender systems, optimizing least squares or user experienceRecommender systems, optimizing least squares or user experience
Recommender systems, optimizing least squares or user experienceData Science Leuven
 
Replicability and questionable research practices
Replicability and questionable research practicesReplicability and questionable research practices
Replicability and questionable research practicesData Science Leuven
 
Predicting Eurosong with Google Predicting Eurosong with Google and data visu...
Predicting Eurosong with Google Predicting Eurosong with Google and data visu...Predicting Eurosong with Google Predicting Eurosong with Google and data visu...
Predicting Eurosong with Google Predicting Eurosong with Google and data visu...Data Science Leuven
 
Storytelling for impactful predictive models - Gert De Geyter
Storytelling for impactful predictive models - Gert De GeyterStorytelling for impactful predictive models - Gert De Geyter
Storytelling for impactful predictive models - Gert De GeyterData Science Leuven
 
Lessons from driving analytics projects
Lessons from driving analytics projectsLessons from driving analytics projects
Lessons from driving analytics projectsData Science Leuven
 
Open-Source Data Science Crossing The Chasm
Open-Source Data Science Crossing The ChasmOpen-Source Data Science Crossing The Chasm
Open-Source Data Science Crossing The ChasmData Science Leuven
 
Probabilistic machine learning for optimization and solving complex
Probabilistic machine learning for optimization and solving complexProbabilistic machine learning for optimization and solving complex
Probabilistic machine learning for optimization and solving complexData Science Leuven
 

More from Data Science Leuven (20)

Statbel and big data
Statbel and big dataStatbel and big data
Statbel and big data
 
Learning from positive and unlabeled data
Learning from positive and unlabeled dataLearning from positive and unlabeled data
Learning from positive and unlabeled data
 
Lighthouse - an open-source library to build data lakes - Kris Peeters
Lighthouse - an open-source library to build data lakes - Kris PeetersLighthouse - an open-source library to build data lakes - Kris Peeters
Lighthouse - an open-source library to build data lakes - Kris Peeters
 
Recommender systems for job search - Michael Reusens
Recommender systems for job search - Michael ReusensRecommender systems for job search - Michael Reusens
Recommender systems for job search - Michael Reusens
 
VITO WatchItGrow - Jeroen Dries
VITO WatchItGrow - Jeroen DriesVITO WatchItGrow - Jeroen Dries
VITO WatchItGrow - Jeroen Dries
 
How to build a search engine in 2 days
How to build a search engine in 2 daysHow to build a search engine in 2 days
How to build a search engine in 2 days
 
Uplift models
Uplift modelsUplift models
Uplift models
 
Value from health data
Value from health dataValue from health data
Value from health data
 
Computing power and algorithms? In people we trust
Computing power and algorithms? In people we trustComputing power and algorithms? In people we trust
Computing power and algorithms? In people we trust
 
Trumania , a realistic scenario-based data-generator
Trumania , a realistic scenario-based data-generatorTrumania , a realistic scenario-based data-generator
Trumania , a realistic scenario-based data-generator
 
Recommender systems, optimizing least squares or user experience
Recommender systems, optimizing least squares or user experienceRecommender systems, optimizing least squares or user experience
Recommender systems, optimizing least squares or user experience
 
Replicability and questionable research practices
Replicability and questionable research practicesReplicability and questionable research practices
Replicability and questionable research practices
 
Predicting Eurosong with Google Predicting Eurosong with Google and data visu...
Predicting Eurosong with Google Predicting Eurosong with Google and data visu...Predicting Eurosong with Google Predicting Eurosong with Google and data visu...
Predicting Eurosong with Google Predicting Eurosong with Google and data visu...
 
Storytelling for impactful predictive models - Gert De Geyter
Storytelling for impactful predictive models - Gert De GeyterStorytelling for impactful predictive models - Gert De Geyter
Storytelling for impactful predictive models - Gert De Geyter
 
Lessons from driving analytics projects
Lessons from driving analytics projectsLessons from driving analytics projects
Lessons from driving analytics projects
 
Geospatial visual analytics
Geospatial visual analyticsGeospatial visual analytics
Geospatial visual analytics
 
Open-Source Data Science Crossing The Chasm
Open-Source Data Science Crossing The ChasmOpen-Source Data Science Crossing The Chasm
Open-Source Data Science Crossing The Chasm
 
Probabilistic machine learning for optimization and solving complex
Probabilistic machine learning for optimization and solving complexProbabilistic machine learning for optimization and solving complex
Probabilistic machine learning for optimization and solving complex
 
Closing
ClosingClosing
Closing
 
Welcome
WelcomeWelcome
Welcome
 

Recently uploaded

一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单enxupq
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单ewymefz
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单ewymefz
 
How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?DOT TECH
 
Computer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage sComputer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage sMAQIB18
 
Webinar One View, Multiple Systems No-Code Integration of Salesforce and ERPs
Webinar One View, Multiple Systems No-Code Integration of Salesforce and ERPsWebinar One View, Multiple Systems No-Code Integration of Salesforce and ERPs
Webinar One View, Multiple Systems No-Code Integration of Salesforce and ERPsCEPTES Software Inc
 
Pre-ProductionImproveddsfjgndflghtgg.pptx
Pre-ProductionImproveddsfjgndflghtgg.pptxPre-ProductionImproveddsfjgndflghtgg.pptx
Pre-ProductionImproveddsfjgndflghtgg.pptxStephen266013
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单yhkoc
 
Using PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDBUsing PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDBAlireza Kamrani
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...correoyaya
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay
 
Tabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflowsTabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflowsalex933524
 
Business update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIBusiness update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIAlejandraGmez176757
 
Investigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesInvestigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesStarCompliance.io
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJames Polillo
 
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflictSupply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflictJack Cole
 
Exploratory Data Analysis - Dilip S.pptx
Exploratory Data Analysis - Dilip S.pptxExploratory Data Analysis - Dilip S.pptx
Exploratory Data Analysis - Dilip S.pptxDilipVasan
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .NABLAS株式会社
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundOppotus
 

Recently uploaded (20)

一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
Slip-and-fall Injuries: Top Workers' Comp Claims
Slip-and-fall Injuries: Top Workers' Comp ClaimsSlip-and-fall Injuries: Top Workers' Comp Claims
Slip-and-fall Injuries: Top Workers' Comp Claims
 
How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?
 
Computer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage sComputer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage s
 
Webinar One View, Multiple Systems No-Code Integration of Salesforce and ERPs
Webinar One View, Multiple Systems No-Code Integration of Salesforce and ERPsWebinar One View, Multiple Systems No-Code Integration of Salesforce and ERPs
Webinar One View, Multiple Systems No-Code Integration of Salesforce and ERPs
 
Pre-ProductionImproveddsfjgndflghtgg.pptx
Pre-ProductionImproveddsfjgndflghtgg.pptxPre-ProductionImproveddsfjgndflghtgg.pptx
Pre-ProductionImproveddsfjgndflghtgg.pptx
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
Using PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDBUsing PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDB
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
Tabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflowsTabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflows
 
Business update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIBusiness update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMI
 
Investigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesInvestigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_Crimes
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
 
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflictSupply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
 
Exploratory Data Analysis - Dilip S.pptx
Exploratory Data Analysis - Dilip S.pptxExploratory Data Analysis - Dilip S.pptx
Exploratory Data Analysis - Dilip S.pptx
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 

Distributed Deep Learning Using Java on the Client and in the Cloud

  • 1. Distributed Deep Learning Using Java on the Client and in the Cloud Johan Vos, Gluon, @johanvos https://gluonhq.com
  • 2. What we will discuss • Brief introduction in deep learning and how to do that in Java using deeplearning4j. • Client-side deep learning (on mobile) helps with privacy, security and improves the model in the Cloud. • Leverage Java deep learning algorithms in cross- platform, performant and beautiful Java mobile apps.
  • 3. My history • MSc engineering, KULeuven, 1995 • PhD Applied Physics, TUDelft, 2000 • Data processing and visualization • Involves – Sensors, small devices – HPC – Visualisation • Java
  • 4. When science shops become mature, they turn into Java shops • Java works on large enterprise systems, with many libraries available • Java works with small devices and sensors • Java has AI libraries • Java has a REPL: Jshell • IDE’s • Mature language • Security is a cornerstone
  • 9. Deep Learning • A class of machine learning algorithms • Can be supervised and unsupervised • Raw input data (e.g. images, text, numbers) traverses a number of layers, where the last layer typically is a classification • Resources: https://deeplearning4j.org/ deeplearningforbeginners.html
  • 11. Deeplearning4j • https://deeplearning4j.org • Java framework providing Deep Learning functionality • Implementations use native mathematical libraries and GPU (if available) • Created by SkyMind • Open-source at github
  • 12. Learning about digits • Mnist dataset • 60,000 labeled training images • 10,000 labeled test images • Supervised learning
  • 13. About the code • All code shown in this presentations is in https://github.com/gluonhq/gluon-samples/tree/master/mnist • Java standalone application to train model and make predictions • Server using Payara on Oracle Cloud • Mobile app sending requests to cloud and making local predictions
  • 14. Train and evaluate network • Retrieve mnist data (70,000 labeled images) • Create a 2-layer neural network • Train network with mnist data • Evaluate quality (how much % of test images fails?) • Make prediction with own data
  • 15. Creating a Model for mnist         MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()                 .optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT)                 .layer(0, new DenseLayer.Builder()                         .nIn(height * width)                         .nOut(100)                         .activation(Activation.RELU)                         .weightInit(WeightInit.XAVIER)                         .build())                 .layer(1, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)                         .nIn(100)                         .nOut(outputNum)                         .activation(Activation.SOFTMAX)                         .weightInit(WeightInit.XAVIER)                         .build())                 .backprop(true)                 .setInputType(InputType.convolutional(height, width, channels))                 .build();
  • 16. Train Model ==================Confusion Matrix========================= 0 1 2 3 4 5 6 7 8 9 --------------------------------------------------- 961 0 2 2 0 6 5 1 3 0 | 0 = 0 0 1113 2 2 0 1 4 2 11 0 | 1 = 1 8 8 908 18 9 3 14 14 45 5 | 2 = 2 2 1 15 929 0 29 2 12 14 6 | 3 = 3 1 4 5 1 917 0 9 2 6 37 | 4 = 4 9 4 3 26 9 794 10 5 24 8 | 5 = 5 11 3 4 1 15 19 899 2 4 0 | 6 = 6 2 11 23 7 5 1 0 948 3 28 | 7 = 7 7 6 6 22 8 16 10 10 881 8 | 8 = 8 10 7 1 12 40 11 0 21 4 903 | 9 = 9
  • 17. Server setup • Runs in every cloud or on premise • 12 million Java developers can do this
  • 18. Mobile client • Java app, using JavaFX for UI • Allow camera to take pictures, or select pictures from gallery • Send image to Cloud • Cloud returns prediction • Show prediction in the app • If incorrect, ask user to provide correct result • Send corrected result to server and retrain
  • 19. Security • Direct connections between Mobile devices and enterprise back-ends are a security nightmare (for developers and operators) 

  • 20. Gluon CloudLink Gluon CloudLink Dashboard (https://gluon.io) Backend Application Mobile Application Public cloud infrastructure Cloud Application Container Cloud Configuration Storage DB
  • 21. Monitor calls via Gluon CloudLink
  • 22. Did we have permission to do this? • Sending personal, raw data to cloud systems might be sensitive. • Pictures, locations, audio, video,… are all very relevant input for AI and Deep Learning • If users have to give permission for this, chances are they will refuse.
  • 23. Distributed Deep Learning • Since we are using Java on the Client, we can run the exact same code to use the model and to predictions • Model is still retrieved from the server • Predictions are made on client, using raw input data from client
  • 24. Quality concerns • Supervised learning not possible anymore? • We can do local training • And synchronize model to server
  • 26. Client-side learning • Retrain model on the (mobile) client. – Synchronous – At night – Use raw user data to improve the local model – Send new gradient (or delta with previous gradient) to server
  • 27. Server-side update • Accept changes from clients – Merge weights in a smart way – Send updated model to all clients
  • 28. Conclusions • Deep Learning algorithms provide many opportunities • Java developers can use Deep Learning API’s • Deep Learning applications run very well on Cloud systems • Java Mobile applications can be used as clients for Deep Learning cloud applications • Java on Mobile allows to do more processing on the mobile client, respecting user privacy and improving cloud model.
  • 29. Thanks For Attending Any Questions? @johanvos Johan.vos@gluonhq.com @gluonhq https://gluonhq.com support@gluonhq.com