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

Long Short-Term Memory (LSTM) models with TensorFlow | Sahil Dua

Sahil Dua
December 06, 2017

Long Short-Term Memory (LSTM) models with TensorFlow | Sahil Dua

Long Short-Term Memory (LSTM) is a Recurrent Neural Network (RNN) architecture that looks at a sequence and remembers values over long intervals. LSTMs have been known to have achieved state of the art performance in many sequence classification problems. In this talk, I’ll cover how to write an LSTM using TensorFlow’s Python API for natural language understanding. This is going to be a code-heavy talk where I will implement the LSTM model and explain the math behind it step-by-step.

In short, it will cover:

– Understanding how the math behind LSTM architecture works in case of sequence classification
– Writing an LSTM model using TensorFlow for sentiment classification of variable length English language sentences
– Gotchas of using LSTMs on real data

Sahil Dua

December 06, 2017
Tweet

More Decks by Sahil Dua

Other Decks in Technology

Transcript

  1. ➔ Developer at Booking.com ➔ Open Source Community Leader, DuckDuckGo

    ➔ Contributor: ◆ Git ◆ Pandas ◆ Go-GitHub ◆ Linguist ◆ etc… whoami
  2. Agenda ➔ Deep Learning for NLP ➔ Word Representations ➔

    How to handle sequences? ◆ LSTMs ➔ TensorFlow Implementation of LSTM
  3. NLP Tasks ➔ Question Answering ➔ Sentiment Analysis ➔ Image

    to Text mapping ➔ Machine Translation ➔ Speech Recognition
  4. Inputs to different types of models ➔ Convolutional Neural Networks

    ➔ Logistic Regression ➔ Reinforcement Learning
  5. Challenges in modelling sequences ➔ How to preserve order of

    words? ◆ The food was good, not bad at all. ◆ The food was bad, not good at all.
  6. Challenges in modelling sequences ➔ How to deal with different

    word orders? ◆ On Monday, it was raining. ◆ It was raining on Monday.
  7. Challenges in modelling sequences ➔ How to keep track of

    long term dependencies? ◆ In Berlin, I had a great time and I learnt some of the ________ language.
  8. Challenges in modelling sequences ➔ How to deal with variable

    length of sequences? ◆ Awesome. ◆ Food was good. ◆ I didn’t like that place at all.