Neural Translation with Pytorch GTC 2017 JEREMY HOWARD - - PowerPoint PPT Presentation

neural translation
SMART_READER_LITE
LIVE PREVIEW

Neural Translation with Pytorch GTC 2017 JEREMY HOWARD - - PowerPoint PPT Presentation

Neural Translation with Pytorch GTC 2017 JEREMY HOWARD @JEREMYPHOWARD Im assuming some knowledge of Python Jupyter Numpy Word RNNs vectors Some review today course.fast.ai https://github.com/ jph00/part2 Our destination


slide-1
SLIDE 1

Neural Translation with Pytorch

GTC 2017 JEREMY HOWARD @JEREMYPHOWARD

slide-2
SLIDE 2

I’m assuming some knowledge of…

Python Jupyter Numpy Word vectors RNNs

Some review today

slide-3
SLIDE 3

course.fast.ai

slide-4
SLIDE 4

https://github.com/jph00/part2

slide-5
SLIDE 5

Our destination

https://github.com/jph00/part2

slide-6
SLIDE 6

Data source

Created by Chris Callison-Burch Crawled millions of web pages Used 'a set of simple heuristics’

  • Transform French URLs onto English URLs
  • i.e. replacing "fr" with "en" and about 40 other hand-written rules

Assume that these documents are translations of each other

slide-7
SLIDE 7

The dataset – just the questions

slide-8
SLIDE 8

Tokenizing

Because we are translating at word level, we need to tokenize the text first. There are many tokenizers available, but we found we got best results using these simple heuristics.

slide-9
SLIDE 9
slide-10
SLIDE 10
slide-11
SLIDE 11
slide-12
SLIDE 12

Final preprocessing result

slide-13
SLIDE 13
slide-14
SLIDE 14
slide-15
SLIDE 15

Unrolled stacked RNNs for sequences

word 1 input word 2 input word 3 input

Input Hidden Output InputHidden HiddenOutput HiddenHidden

slide-16
SLIDE 16

Equivalent recursive diagram

char n input

Repeat for 1n-1 Initialize to zeros Repeat for 1n-1 Initialize to zeros

slide-17
SLIDE 17

This and following 3 slides thanks to Chris Manning (Stanford) https://simons.berkeley.edu/talks/christopher-manning-2017-3-27

slide-18
SLIDE 18
slide-19
SLIDE 19
slide-20
SLIDE 20
slide-21
SLIDE 21

* Equation from: “Grammar as a Foreign Language”

slide-22
SLIDE 22

Beam search

What is canada 's population ? Quelle est la population du Canada ? Que Quoi le les en pour

slide-23
SLIDE 23

Neural Translation with Pytorch

GTC 2017 JEREMY HOWARD @JEREMYPHOWARD