From the course: Deep Learning Foundations: Natural Language Processing with TensorFlow
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Implementing LSTMs with TensorFlow - TensorFlow Tutorial
From the course: Deep Learning Foundations: Natural Language Processing with TensorFlow
Implementing LSTMs with TensorFlow
- [Instructor] So we have understood the importance of sequence and providing context to classify texts as positive or negative, or you can say sarcastic or non-sarcastic. Now, in this particular video, we are going to implement the LSTM based model to classify our news headlines as sarcastic or not sarcastic. We're using the same dataset that we have used in the previous chapters. So here, first of all, let's import all of the packages that we are going to be using. So when NumPy, TensorFlow, tokenizer, or pad_sequences make sure that you're using TensorFlow 2.x. So we are currently using 2.4.1. So quickly download your data and read it using the pandas package. So again, we have the same dataset headline column and is_sarcastic column is the one that we are interested in, segregate create arrays for both your headlines and your labels. The next part, very important part is defining the parameters for tokenizing…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.