Code Examples from Philipp Koehn's NMT textbook

This is just some of the code examples from Phillip Koehn's textbook Neural Machine Translation.

###Code The code examples are written in Python and require pytorch.

  • Chapter 5: a basic neural network for xor nn.py
  • Chapter 6: xor example with pytorch torch_basic.py (Sec. 6.3.1), torch_batch.py, torch_loop.py (Sec. 6.3.2), torch_loop_batch_update.py (Sec. 6.3.3), torch_module.py (Sec. 6.3.4)
  • Chapter 7: recurrent neural network rnn.py
  • Chapter 8: neural machine translation nmt.py, Tanzil.20k.de-en.de, Tanzil.20k.de-en.en
  • Chapter 9: decoder decoder.py

All code in a package: code.tgz