Homework assignments will be done individually: each student must hand in their own answers. Use of partial or entire solutions obtained from others or online is strictly prohibited. Electronic submission on Canvas is mandatory.
Machine Translation
A Sequence to Sequence network, or seq2seq network, is a model consisting of two separate RNNs called the encoder and decoder. The encoder reads an input sequence one item at a time, and outputs a vector at each step. The final output of the encoder is kept as the context vector. The decoder uses this context vector to produce a sequence of outputs one step at a time.
The attention mechanism introduced by Bahdanau et al. gives the decoder a way to pay attention to parts of the input, rather than relying on a single vector. For every step the decoder can select a different part of the input sentence to consider.
- Download a pair of languages (French-English or German-English is preferred.)
- (60 pts) Implement an encoder RNN class, a decoder RNN class, and an attention Decoder RNN class.
- (10 pts) Divide the data into training and testing or use cross-validation. Train the model on the training data. Print the training loss every 200 iterations.
- (10 pts) Select a set of sentences from the testing data, and print the translation results from the model (compare to the ground truth).
- (20 pts) Compute the BLEU score for the testing data set.
Reviews
There are no reviews yet.