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 Slide

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

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

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

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

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

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

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

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

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

    View Slide

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

    View Slide

  22. View Slide

  23. View Slide

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

    View Slide

  25. © 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 Slide

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

    View Slide

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

    View Slide

  28. 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 Slide

  29. View Slide

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

    View Slide

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

    View Slide

  32. © 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 Slide

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

    View Slide

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

    View Slide

  35. © 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 Slide

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

    View Slide

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

    View Slide

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

    View Slide

  39. View Slide

  40. © 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 Slide

  41. © 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 Slide

  42. View Slide

  43. © 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 Slide

  44. © 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 Slide

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

    View Slide