Reading CSV file... Parsed 79171 sentences. Found 65376 unique words tokens. Using vocabulary size 8000. The least frequent word in our vocabulary is ‘documentary‘ and appeared 10 times. Example sentence: ‘SENTENCE_START i joined a new league this year and they have different scoring rules than i‘m used to. SENTENCE_END‘ Example sentence after Pre-processing: ‘[‘SENTENCE_START‘, ‘i‘, ‘joined‘, ‘a‘, ‘new‘, ‘league‘, ‘this‘, ‘year‘, ‘and‘, ‘they‘, ‘have‘, ‘different‘, ‘scoring‘, ‘rules‘, ‘than‘, ‘i‘, "‘m", ‘used‘, ‘to‘, ‘.‘, ‘SENTENCE_END‘]‘ X_train shape: (78483,) y_train shape: (78483,) x: SENTENCE_START what are n‘t you understanding about this ? ! [0, 51, 27, 16, 10, 858, 54, 25, 34, 69] y: what are n‘t you understanding about this ? ! SENTENCE_END [51, 27, 16, 10, 858, 54, 25, 34, 69, 1] 2020-02-17 21:40:17: Loss after num_examples_seen=0 epoch=0: 8.987458 2020-02-17 21:42:08: Loss after num_examples_seen=100 epoch=1: 8.973082 2020-02-17 21:44:01: Loss after num_examples_seen=200 epoch=2: 8.951076 2020-02-17 21:45:51: Loss after num_examples_seen=300 epoch=3: 8.907623 2020-02-17 21:47:41: Loss after num_examples_seen=400 epoch=4: 8.803412 2020-02-17 21:49:35: Loss after num_examples_seen=500 epoch=5: 6.866650 2020-02-17 21:51:26: Loss after num_examples_seen=600 epoch=6: 6.271906 2020-02-17 21:53:18: Loss after num_examples_seen=700 epoch=7: 5.981103 2020-02-17 21:55:09: Loss after num_examples_seen=800 epoch=8: 5.786999 2020-02-17 21:57:01: Loss after num_examples_seen=900 epoch=9: 5.654783
参考:
https://github.com/pangolulu/rnn-from-scratch
https://blog.csdn.net/xfwdxt/article/details/102823159
Implementing Recurrent Neural Network from Scratch
原文:https://www.cnblogs.com/ratels/p/12324553.html