2. Flask is a micro-service architecture in Python that serves HTTP requests.
Flask can be used for hosting your trained machine learning models.
3. Example code for serving a trained
keras model in Flask.
Going to the predict endpoint calls
the predict function which checks if
the image that was sent is either a
cat or a dog.
4. How are we building the application?
1. Take the saved weights we made from our example working when making a
classifier of potential spam emails
2. Creating a FLASK api that loads the trained model and serves it
5. Trying out the server
python server.py
Trying out the response
6. Trying out the model
Use curl to try out your model.
curl -X POST -F 'image=@dog.jpg' http://127.0.0.1:5000/predict
Response:
7. Docker
Docker is a computer
program that performs
operating-system-level
virtualization, also known as
"containerization"
By configuring a Dockerfile,
we can easily deploy a stand
alone operating system with
our code and its required
dependencies
9. Solving problems with Machine Learning
Take five minutes to talk with your neighbour about your data.
● What do you think is your most valuable data assets?
● How structured is your data?
● What data are you missing?
● Do you have any data you would like to try working with today?
If you don’t have data you are working with right now:
Imagine that you are going to launch the ML powered app of your dreams.
10. Kubernetes is an open-source container-orchestration
system for automating deployment, scaling and
management of containerized applications.
It works with a range of container tools, including Docker.
Many public-cloud service providers, provide Kubernetes-
based platform as a service where Kubernetes can be
deployed as a platform-providing service.
Kubernetes
11.
12. Fundamental principles
● You can use tensorflow.js to load your pre-trained model to make them
available in the browser.
● By using Web-GL the browser can automatically use the graphic
processor on the clients computer to speed up computations running on
the client.
● You can also use tensorflow.js to train models.
● Tensorflow.js gives you the ability to use machine learning by simply
linking tensorflow inside any html document.
● Tensorflow.js is also available as a node package.
13. Getting started
Tensorflow js has a great library of
examples including one aptly named.
Getting started
https://github.com/tensorflow/tfjs-
examples/tree/master/getting_started
HTML
Javascript
17. Takeaways so far
● AI is growing more and more powerful every year
● We are moving from a field of research to a toolbox for
engineers
● The difficult parts of using AI are often the last steps:
Deploying models and creating robust systems
18. ML / Deep Learning lecture
Birger Moëll Machine Learning Engineer Ayond AB
birger.moell@ayond.se
Morning
Session 1 Intro to deep learning
09:00-09:30 Introduction to Machine learning / Deep Learning | Talk |
09:30-09:45 Getting your machines ready for machine learning | Code |
09:45-10:00 Coffee and break
Session 2 Hello world
10:00-10:15 Hello World in Machine Learning (MNIST) | Talk |
10:15-10:45 Running your own MNIST | Code |
10:45-11:00 Coffee and break
Session 3 Feedforward networks
11:00-11.15 Feedforward Neural Networks | Talk |
11.15-11.45 Building your own feedforward neural network | Code |
11:45-12:00 Q and A | Interactive
Lunch
12:00-13:00 Lunch
Afternoon
Session 4 Image recognition
13:00-13.15 Image recognition and CNNs | Talk |
13:15-13:45 Building your own convolutional neural network | Code |
13:45-14:00 Coffee and break
Session 5 Natural Language Processing
14:00-14.15 Natural language processing | Talk |
14:15-14:45 Working with language | Code |
14:45-15:00 Coffee and break
Session 6-7 Generative models and time series
15:00-15.15 Generative models and LSTMs | Talk |
15:15-15:45 Trying out GANS and time series | Code |
15:45-16:00 Coffee and break
Session 8 Machine learning in the wild / Deployment
16:00-16.15 Machine learning in the wild | Talk |
16:15-16:45 Serving your own machine learning model | Code |
16:45-17:00 Q and A | Interactive
Notes de l'éditeur
Show frontend and backendcurl -d "{\"text\":\"Work work work\"}" -H "Content-Type: application/json" https://fullday-kfrxa26u3a-uc.a.run.app/api
"0"
Show docker
Show deploymentShow website https://birgermoell.github.io/fulldayfrontend/index.html
https://github.com/BirgerMoell/fulldaydeeplearning/