MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / wikipedia

Function wikipedia

rnn_class/srn_language.py:230–235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228 rnn.generate(pi, word2idx)
229
230def 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
237if __name__ == '__main__':
238 train_poetry()

Callers

nothing calls this directly

Calls 3

fitMethod · 0.95
get_wikipedia_dataFunction · 0.90
SimpleRNNClass · 0.70

Tested by

no test coverage detected