()
| 228 | rnn.generate(pi, word2idx) |
| 229 | |
| 230 | def wikipedia(): |
| 231 | sentences, word2idx = get_wikipedia_data() |
| 232 | print("finished retrieving data") |
| 233 | print("vocab size:", len(word2idx), "number of sentences:", len(sentences)) |
| 234 | rnn = SimpleRNN(20, 15, len(word2idx)) |
| 235 | rnn.fit(sentences, learning_rate=1e-4, show_fig=True, activation=T.nnet.relu) |
| 236 | |
| 237 | if __name__ == '__main__': |
| 238 | train_poetry() |
nothing calls this directly
no test coverage detected