Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Playing with Machine Learning

Playing with Machine Learning

AIBE Summit, London, January 29th, 2020

Sorry, there are a few videos missing in the slides.

Danilo Poccia

January 29, 2020
Tweet

More Decks by Danilo Poccia

Other Decks in Technology

Transcript

  1. © 2020, Amazon Web Services, Inc. or its Affiliates.
    Danilo Poccia
    Principal Evangelist, AWS
    @danilop
    Playing with Machine Learning

    View full-size slide

  2. Science Museum Group Collection
    © The Board of Trustees of the Science Museum

    View full-size slide

  3. Diagram of an algorithm for the Analytical Engine for the computation of Bernoulli numbers, from Sketch of The
    Analytical Engine Invented by Charles Babbage by Luigi Menabrea with notes by Ada Lovelace

    View full-size slide

  4. Letter from Ada Lovelace to Charles Babbage 1843
    In this letter, Lovelace suggests an example of a
    calculation which “may be worked out by the engine
    without having been worked out by human head and
    hands first”.

    View full-size slide

  5. © 2020, Amazon Web Services, Inc. or its Affiliates.
    Machine Learning

    View full-size slide

  6. © 2020, Amazon Web Services, Inc. or its Affiliates.
    http://www.thehudsonvalley.com/articles/60-years-ago-today-local-technology-demonstrated-artificial-intelligence-for-the-first-time
    Arthur Samuel (1959)

    View full-size slide

  7. © 2020, Amazon Web Services, Inc. or its Affiliates.
    Perceptron
    Frank Rosenblatt (1962)

    View full-size slide

  8. © 2020, Amazon Web Services, Inc. or its Affiliates.
    Perceptrons:
    An Introduction
    to Computational Geometry
    A perceptron can only solve
    linearly separable functions
    (e.g. no XOR)
    Marvin Minsky, Seymour Papert (1969)

    View full-size slide

  9. © 2020, Amazon Web Services, Inc. or its Affiliates.
    Intel Xeon CPU
    28 cores
    NVIDIA V100 GPU
    5,120 CUDA Cores
    640 Tensor Cores
    M
    oore’s
    Law
    Microprocessor Transistor Counts 1971-2018

    View full-size slide

  10. © 2020, Amazon Web Services, Inc. or its Affiliates.
    Deep Learning

    View full-size slide

  11. © 2020, Amazon Web Services, Inc. or its Affiliates.
    © 2020, Amazon Web Services, Inc. or its Affiliates.
    output
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    How to give images in input
    to a Neural Network?
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View full-size slide

  12. © 2020, Amazon Web Services, Inc. or its Affiliates.
    © 2020, Amazon Web Services, Inc. or its Affiliates.
    Convolution Matrix
    0 0 0
    0 1 0
    0 0 0
    Identity
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View full-size slide

  13. © 2020, Amazon Web Services, Inc. or its Affiliates.
    © 2020, Amazon Web Services, Inc. or its Affiliates.
    Convolution Matrix
    1 0 -1
    2 0 -2
    1 0 -1
    Left Edges
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View full-size slide

  14. © 2020, Amazon Web Services, Inc. or its Affiliates.
    © 2020, Amazon Web Services, Inc. or its Affiliates.
    Convolution Matrix
    -1 0 1
    -2 0 2
    -1 0 1
    Right Edges
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View full-size slide

  15. © 2020, Amazon Web Services, Inc. or its Affiliates.
    © 2020, Amazon Web Services, Inc. or its Affiliates.
    Convolution Matrix
    1 2 1
    0 0 0
    -1 -2 -1
    Top Edges
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View full-size slide

  16. © 2020, Amazon Web Services, Inc. or its Affiliates.
    © 2020, Amazon Web Services, Inc. or its Affiliates.
    Convolution Matrix
    -1 -2 -1
    0 0 0
    1 2 1
    Bottom Edges
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View full-size slide

  17. © 2020, Amazon Web Services, Inc. or its Affiliates.
    © 2020, Amazon Web Services, Inc. or its Affiliates.
    Convolution Matrix
    0.6 -0.6 1.2
    -1.4 1.2 -1.6
    0.8 -1.4 1.6
    Random Values
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View full-size slide

  18. © 2020, Amazon Web Services, Inc. or its Affiliates.
    By Debarko De @debarko
    https://hackernoon.com/what-is-a-capsnet-or-capsule-network-2bfbe48769cc
    Convolutional Neural Networks (CNNs)

    View full-size slide

  19. © 2020, Amazon Web Services, Inc. or its Affiliates.
    0
    5
    10
    15
    20
    25
    30
    2010 2011 2012 2013 2014 2015 2016 2017
    CNNs
    ImageNet Classification Error Over Time

    View full-size slide

  20. © 2020, Amazon Web Services, Inc. or its Affiliates.
    AWS DeepLens
    Get hands-on
    with
    Deep Learning
    2017

    View full-size slide

  21. © 2020, Amazon Web Services, Inc. or its Affiliates.
    AWS DeepLens

    View full-size slide

  22. © 2020, Amazon Web Services, Inc. or its Affiliates.
    AWS DeepLens Video

    View full-size slide

  23. © 2020, Amazon Web Services, Inc. or its Affiliates.
    Supervised learning
    Example-driven training — with labeled data of known
    outputs for given inputs, a model is trained to predict
    output for new inputs.
    Unsupervised learning
    Inference-based training — with unlabeled data without
    known outputs, a model is trained to identify related
    structures or similar patterns within the input data.

    View full-size slide

  24. © 2020, Amazon Web Services, Inc. or its Affiliates.
    Reinforcement Learning

    View full-size slide

  25. © 2020, Amazon Web Services, Inc. or its Affiliates.
    AWS DeepRacer 2018

    View full-size slide

  26. In the box
    3
    2
    1
    4
    5
    9
    10a
    7a
    6a
    10b
    7b
    6b
    8
    1. Vehicle chassis
    2. Vehicle body shell
    3. Micro-USB to USB-A cable
    4. Compute battery
    5. Compute battery connector cable
    6a. Compute battery charge adapter
    6b. Computer battery charge cable
    7a. Vehicle power cable
    7b. Vehicle power adapter
    8. Pins (spare parts)
    9. Vehicle battery
    10a. Vehicle battery charge adapter
    10b. Vehicle battery charge cable
    11. Silicon cable holder (not shown)
    12. White marking tape (not shown)
    1
    Vehicle at a glance
    Front
    Front
    Back
    Back
    Camera
    4 MP camera
    with MJPEG
    SD card slot
    Power button
    HDMI
    Micro USB
    USB C
    USB
    Reset button
    Power on/off Vehicle chassis
    Status LEDs
    Compute
    module
    Customizable LED
    Compute battery on/off
    2

    View full-size slide

  27. © 2020, Amazon Web Services, Inc. or its Affiliates.
    AWS DeepRacer Video

    View full-size slide

  28. © 2020, Amazon Web Services, Inc. or its Affiliates.
    What next?
    Generative Machine Learning

    View full-size slide

  29. © 2020, Amazon Web Services, Inc. or its Affiliates.
    Generator
    Neural
    Network
    Discriminator
    Neural
    Network
    Real or
    Generated?
    Real
    Picture
    Generated
    Picture
    Generative Adversarial Networks (GANs)

    View full-size slide

  30. © 2020, Amazon Web Services, Inc. or its Affiliates.
    2014
    Generative Adversarial Networks (GANs)

    View full-size slide

  31. © 2020, Amazon Web Services, Inc. or its Affiliates.
    2016
    Generative Adversarial Networks (GANs)

    View full-size slide

  32. © 2020, Amazon Web Services, Inc. or its Affiliates.
    StyleGAN2 (2019)
    https://thispersondoesnotexist.com
    https://arxiv.org/abs/1812.04948
    http://arxiv.org/abs/1912.04958

    View full-size slide

  33. © 2020, Amazon Web Services, Inc. or its Affiliates.
    What else can we ”generate” ?
    Music

    View full-size slide

  34. © 2020, Amazon Web Services, Inc. or its Affiliates.
    AWS DeepComposer 2019

    View full-size slide

  35. © 2020, Amazon Web Services, Inc. or its Affiliates.

    View full-size slide

  36. © 2020, Amazon Web Services, Inc. or its Affiliates.
    What about high-level, easy to use
    AI services?
    Text-To-Speech
    Object Detection
    Language Translation
    Sentiment Analysis

    View full-size slide

  37. © 2020, Amazon Web Services, Inc. or its Affiliates.
    Let’s build a “Positive Chat” J
    • Avoid negative sentiment
    • Reject negative sentences
    • Positive sentiment gamification
    • Automatically translate between different languages
    • Extract message topics to improve searchability and discoverability
    • Create and update a chat room “tag cloud”
    • Search or filter messages by “tag”

    View full-size slide

  38. © 2020, Amazon Web Services, Inc. or its Affiliates.
    $ wc -l positive-chat/app.js
    326 positive-chat/app.js
    $ wc -l www/index.js
    204 www/index.js
    backend + frontend ≃ 460 lines of code
    removing empty lines and comments
    https://github.com/danilop/serverless-positive-chat

    View full-size slide

  39. © 2020, Amazon Web Services, Inc. or its Affiliates.
    Reinforcement
    Learning
    Deep
    Learning
    Generative
    Adversarial
    Networks
    Let’s Play and Learn with Machine Learning
    AI
    Services

    View full-size slide

  40. © 2020, Amazon Web Services, Inc. or its Affiliates.
    Thank you!
    @danilop
    Please give me your feedback!

    View full-size slide