
Explore recurrent neural networks and their memory mechanisms, including long short-term memory (LSTM), to model sequential data for tasks like stock price prediction and next-word generation.
Explore activation functions like sigmoid, ReLU, and leaky ReLU and their vanishing gradient issues. Learn how backpropagation through time and LSTM memory address learning in deep networks.
Understand how an LSTM cell uses forget and input gates to manage memory across time steps, updating a memory cell and producing a gated hidden state.
Describe lstm variants where gates use the current input, previous memory, and previous outputs to update the cell state, including a coupled forget-input approach that uses the opposite gate value.
Follow an LSTM step-by-step example that initializes memory cell and hidden states, encodes a sentence, and predicts the next word using a multilayer perception.
Dive into sequence modeling with encoder–decoder neural networks. Implement image captioning and machine translation using variable input-output lengths, and learn about teacher forcing and attention mechanisms in future lessons.
Explore how attention mechanisms in LSTMs let the decoder focus on specific input words when generating outputs, enabling translations and image captions.
Learn how attention mechanisms use a decoder query to compare with encoder keys and values via dot products, produce attention weights, and form a context vector that guides next-word generation.
Install and explore PyTorch, a powerful deep learning framework with dynamic computation graphs and tensors, and verify setup with Anaconda, Jupyter notebook, and torch import for GPU acceleration.
Learn to create and manipulate torch tensors in Python, from 1d/2d matrices to 3d tensors with channels, using shape, size, dtype, mean, and view reshaping.
Learn to create and manipulate torch tensors with random numbers and normal distribution, inspect shapes and dtypes, initialize zeros and ones, generate integers, and perform slicing and in-place addition.
Master the NumPy bridge to convert between Torch tensors and NumPy arrays, perform in-place edits, and move tensors to the GPU for faster computation, including concatenation and adding dimensions.
Learn to build a chatbot dataset by loading a movie dialogue corpus, parsing lines into line id, character, movie, and dialogue, and visualizing sample data.
Process the dataset by parsing each line into a dictionary of fields: line id, character id, movie id, character, and text, and build a line dictionary keyed by line id.
Learn how to extract and structure a dialogue dataset by pairing each question with its reply, building a qa pairs list, validating entries, and preparing data for efficient storage.
Save the dialogue data into a new text file named formatted movieline in the Cornello movie Belak corpus, using the CXXVI library to write rows separated by a tab delimiter.
Build a vocabulary class to process words, map them to unique indices, count frequencies, and manage start, end, and padding tokens. Trim low-frequency words with a threshold to refine vocabulary.
Learn how to preprocess text for neural networks by converting strings to ascii, removing accents with nfd, lowercasing, stripping whitespace, and replacing non-letter sequences with spaces via regex.
Process a UTF-8 data file of chatbot conversations, splitting lines by a tab into two speakers and normalizing utterances. Build a vocabulary from normalized pairs and prepare for model training.
Filter text by removing sentences exceeding a maximum length of ten words, split each sentence to count words, and keep only pairs where both sentences meet the length threshold.
Build a vocabulary from conversation pairs by adding sentences to the vocabulary class, trim rare words with a three-occurrence minimum, and keep only pairs where every word meets the threshold.
Prepare preprocessed sentences by converting them to word indices via the vocabulary, pad to a maximum length of 10 with zeros, include end-of-sentence tokens, and transpose for batched processing.
Explore the zip function in Python, learn how zip stops at the shortest input and how zip longest pads with zeros or None to align variable-length sequences.
Learn to align two-dimensional lists with zip and zip_longest, handle varying lengths with a fill value, unpack with star, and compute maximum length to shape batched data for the model.
Define a binary matrix converting token indices from vocabulary into a ones and zeros matrix, marking the back token as zero, then prepare input tensors, masks, and lengths with torch.
Prepare chatbot training data by building a batch creation function that sorts Q–A pairs by question length, creates input and target batches, and applies padding and masks with length tracking.
Understand the encoder in sequence-to-sequence chatbots, from inputs forming an encoder state as a fixed feature vector to decoder outputs, including GRU and bidirectional encoding.
Define an encoder class that inherits from the nn model, initializes hidden size and embedding, and uses a bidirectional GRU to perform forward propagation, returning outputs and a hidden state.
Learn how packed padded sequences use lengths and zero padding to process variable-length sentences in an LSTM, feeding only real words.
Design the decoder with an attention mechanism that scores encoder outputs against the current hidden state, uses softmax to create a context vector, and guides word generation.
Apply attention in a decoder for a chatbot, feeding data one time step at a time, using encoder outputs as the decoder input, with embedding and linear layers.
Design the decoder forward function to process one time-step with embedding, a GRU, and attention over encoder outputs, then produce vocabulary scores via a linear layer and softmax.
Define and implement a masked loss function that computes non-zero elements only, using a mask to select relevant targets and decoder outputs before applying negative log likelihood loss.
Explore teacher forcing in sequence-to-sequence chatbots by comparing training with and without teacher forcing, visualizing encoder–decoder steps, and understanding how actual labels guide inputs versus generated outputs.
Visualize training step by step for a chat model, detailing batch size five, encoder and decoder, attention dot, embedding, vocabulary, and Adam optimization.
Visualize sequence-to-sequence training by forwarding encoder outputs to the decoder, initializing decoder states, and exploring teacher forcing, time steps, and loss computation for chatbot modeling.
Train a seq2seq model with encoder and decoder, detailing input, target, and mask shapes, loss accumulation, and teacher forcing. Use backpropagation and gradient clipping to stabilize training.
In this course, you'll learn the following:
RNNs and LSTMs
Sequence Modeling
PyTorch
Building a Chatbot in PyTorch
We will first cover the theoretical concepts you need to know for building a Chatbot, which include RNNs, LSTMS and Sequence Models with Attention.
Then we will introduce you to PyTorch, a very powerful and advanced deep learning Library. We will show you how to install it and how to work with it and with PyTorch Tensors.
Then we will build our Chatbot in PyTorch!
Please Note an important thing: If you don't have prior knowledge on Neural Networks and how they work, you won't be able to cope well with this course. Please note that this is not a Deep Learning course, it's an Application of Deep Learning, as the course names implies (Applied Deep Learning: Build a Chatbot). The course level is Intermediate, and not Beginner. So please familiarize yourself with Neural Networks and it's concepts before taking this course. If you are already familiar, then your ready to start this journey!