参考资料:
Coursera-Sequence Models 第三周作业1
目标
将日期转化为固定格式,“the 29th of August 1958", "03/30/1968", "24 JUNE 1987"——》"1958-08-29", "1968-03-30", "1987-06-24"attention
动机
If you had to translate a book's paragraph from French to English, you would not read the whole paragraph, then close the book and translate. Even during the translation process, you would read/re-read and focus on the parts of the French paragraph corresponding to the parts of the English you are writing down.
对比普通的LSTM,不同的是,将纯输入转化为context,再输入。
注意力,可以看到对应的输出只注意在最正确的部分