Professional Documents
Culture Documents
Unit-4
Machine Learning: Translation, Reinforcement LearningLayer
Jan-July, 2021-22 / Lecture No. 4
3
CS 601
Objective
4
CS 601
Machine Translation
• Neural machine translation (NMT) is an approach to
machine translation that uses an artificial neural network
to predict the likelihood of a sequence of words, typically
modeling entire sentences in a single integrated model.
• In machine translation, encoder-decoder architecture as
shown above. RNN Encoder-Decoder model consists of
two recurrent neural networks.
• Encoder and decoder both use the same neural network
model but play a somewhat different role.
• The encoder is used to encode all the word embeddings
and extract context and long term dependencies which are
then passed over to decoder to generate output sentence.
• There are different types of natural language processing
models that can be used for this purpose.
• One RNN encodes a sequence of words into the fixed-
length vector by first passing it through an embedding
layer which is used to form an embedding matrix and then
it’s fed into a recurrent neural network.
Attention model
• Attention enables our decoder to look at our encoded
source words while translating.
• Attention is most commonly used in sequence-to-
sequence models to attend to encoder states, but can also
be used in any sequence model to look back at past states.
• dot-product attention, which means the dot product of our
intermediate decoder output and our encoder output.
• We then take a weighted sum of our encoder vectors,
using this dot product as the weight.
Beam Search and width
Beam Search and width
• It is popular heuristic that expands upon the greedy search
and returns a list of most likely output sequences.
24
CS 601
Learning Outcomes
25
CS 601
Student Effective Learning Outcomes
26
CS 601
Text & Reference Books
Text Book:
1. Tom M. Mitchell, “Machine Learning”, McGraw Hill Education, First
edition, 2017
2. Ian Goodfellow and Yoshua Bengio and Aaron Courville, “Deep
Learning”, MIT Press, 2016
Reference Book:
3. Andreas Muller, "Introduction to Machine Learning with Python: A
Guide for Data Scientists", Shroff/O'Reilly; First edition (2016).
4. Aurelien Geon, “Hands-On Machine Learning with Scikit-Learn and
Tensorflow: Concepts, Tools, and Techniques to Build Intelligent
Systems”, Shroff/O'Reilly; First edition (2017).
27
CS 601
28
CS 601