$30 off During Our Annual Pro Sale. View Details »

Theano: let's build a net

ktisha
July 03, 2016

Theano: let's build a net

ktisha

July 03, 2016
Tweet

More Decks by ktisha

Other Decks in Programming

Transcript

  1. Theano: let’s build a net
    Ekaterina Tuzova

    View Slide

  2. Motivation

    View Slide

  3. MNIST dataset
    X — images (60000, 784)
    Y — labels (60000, )
    Goal: train a model to look at images and
    predict what digits they are.

    View Slide

  4. K nearest neighbors

    View Slide

  5. K nearest neighbors
    ~95 % accuracy

    View Slide

  6. Feature engineering

    View Slide

  7. Machine Learning

    View Slide

  8. Machine Learning

    View Slide

  9. Variable in Computer Science
    A piece of informations stored somewhere in memory with a name made up by a
    programmer.

    View Slide

  10. Variable in Mathematics
    Indeterminate quantity that can be manipulated using arithmetic operations, or using
    calculus and so on.

    View Slide

  11. Theano

    View Slide

  12. What is Theano?
    A library for efficiently handling mathematical expressions
    involving tensors.

    View Slide

  13. What is tensor?
    Multi-dimensional array.

    View Slide

  14. What is Theano?
    A mathematical symbolic expression compiler.

    View Slide

  15. Quick How-To
    - Define symbolic expression
    - Compile a function that can compute numeric values using those expressions
    - Execute that function on data

    View Slide

  16. Example model
    GoogLeNet, 2014
    ~99.6% accuracy

    View Slide

  17. Logistic regression
    Probabilistic, linear classifier.

    View Slide

  18. Simple model

    View Slide

  19. Preparation

    View Slide

  20. Load MNIST

    View Slide

  21. Define model

    View Slide

  22. Theano shared variable
    Shared between different functions and function calls.

    View Slide

  23. Build model

    View Slide

  24. Train model

    View Slide

  25. Train model
    ~93% accuracy

    View Slide

  26. Simple model

    View Slide

  27. Improve model

    View Slide

  28. Improve model

    View Slide

  29. Improve model

    View Slide

  30. Train model
    ~98.5% accuracy

    View Slide

  31. Thank you.
    @ktisha

    View Slide