In-Depth Performance Testing Guide for IT Professionals
An introduction to Deep Learning with Apache MXNet (November 2017)
1. Julien Simon, AI/ML Evangelist, EMEA
@julsimon
November 8th, 2017
An introduction to Deep Learning
with Apache MXNet
2. Agenda
• The Advent of Deep Learning
• Deep Learning Applications
• Apache MXNet Overview
• Apache MXNet Demos (there will be code, ha!)
3. Artificial Intelligence: design software applications which
exhibit human-like behavior, e.g. speech, natural language
processing, reasoning or intuition
Machine Learning: teach machines to learn without being
explicitly programmed
Deep Learning: using neural networks, teach machines to
learn from complex data where features cannot be explicitly
expressed
9. Infrastructure CPU
Engines MXNet TensorFlow Caffe Theano Pytorch CNTK
Services
Amazon Polly
Chat
Platforms
IoT
Speech
Amazon Lex
Mobile
Amazon AI: Artificial Intelligence In The Hands Of Every Developer
Amazon
ML
Spark &
EMR
Kinesis Batch ECS
GPU
Amazon Rekognition
Vision
FPGA
10. Hardware innovation for Deep Learning
https://aws.amazon.com/blogs/aws/new-amazon-ec2-instances-with-up-to-8-nvidia-tesla-v100-gpus-p3/
https://devblogs.nvidia.com/parallelforall/inside-volta/
https://aws.amazon.com/fr/blogs/aws/now-available-compute-intensive-c5-instances-for-amazon-ec2/
Intel Skylake CPU
November 6th
Nvidia Volta GPU
October 25th
14. • 17,000 images from Instagram
• 7 brands
• Inception v3 model, pre-trained on ImageNet
• Fine-tuning with TensorFlow and EC2 GPU
instances
• Additional work on color extraction
https://technology.condenast.com/story/handbag-brand-and-color-detection
24. Apache MXNet
Programmable Portable High Performance
Near linear scaling
across hundreds of GPUs
Highly efficient
models for mobile
and IoT
Simple syntax,
multiple languages
Most Open Best On AWS
Optimized for
Deep Learning on
AWS
Accepted into the
Apache Incubator
25. Input Output
1 1 1
1 0 1
0 0 0
3
mx. sym. Convol ut i on( dat a, ker nel =( 5, 5) , num_f i l t er =20)
mx. sym. Pool i ng( dat a, pool _t ype=" max" , ker nel =( 2, 2) ,
st r i de=( 2, 2)
l st m. l st m_unr ol l ( num_l st m_l ayer , seq_l en, l en, num_hi dden, num_embed)
4 2
2 0
4=Max
1
3
...
4
0.2
-0.1
...
0.7
mx. sym. Ful l yConnect ed( dat a, num_hi dden=128)
2
mx. symbol . Embeddi ng( dat a, i nput _di m, out put _di m = k)
0.2
-0.1
...
0.7
Queen
4 2
2 0
2=Avg
Input Weights
cos(w, queen ) = cos(w, k i n g) - cos(w, m an ) + cos(w, w om an )
mx. sym. Act i vat i on( dat a, act _t ype=" xxxx" )
" r el u"
" t anh"
" si gmoi d"
" sof t r el u"
Neural Art
Face Search
Image Segmentation
Image Caption
“ People Riding
Bikes”
Bicycle, People,
Road, Sport
Image Labels
Image
Video
Speech
Text
“ People Riding
Bikes”
Machine Translation
“ Οι άνθρωποι
ιππασίας ποδήλατα”
Events
mx. model . FeedFor war d model . f i t
mx. sym. Sof t maxOut put
26. CPU or GPU: your choice
mod = mx.mod.Module(lenet)
mod = mx.mod.Module(lenet, context=mx.gpu(0))
mod = mx.mod.Module(lenet,
context=(mx.gpu(7), mx.gpu(8), mx.gpu(9)))
36. Demo #4 – Machine Translation: German to English
• Sockeye
• 5.8M sentences (news headlines), 5 hours of training on 8 GPUs (p2)
./translate.sh "Chopin zählt zu den bedeutendsten Persönlichkeiten der
Musikgeschichte Polens .”
Chopin is one of the most important personalities of Poland’s history
./translate.sh "Hotelbetreiber müssen künftig nur den Rundfunkbeitrag
bezahlen, wenn ihre Zimmer auch eine Empfangsmöglichkeit bieten .”
in the future , hotel operators must pay only the broadcasting fee if their
rooms also offer a reception facility .
https://aws.amazon.com/blogs/ai/train-neural-machine-translation-models-with-sockeye/
37. Anything you dream is fiction, and anything
you accomplish is science, the whole history
of mankind is nothing but science fiction.
Ray Bradbury