a7cd7a15a9baf741f2b4fcd32f3d8055827889b5,examples/word_language_model/predict.py,,,#,11
Before Change
learner.module_ = torch.load(args.checkpoint)
hidden = learner.module_.init_hidden(1)
input = Variable(torch.rand(1, 1).mul(ntokens).long() , volatile=True)
if args.cuda:
input = input.cuda()
p = learner.predict_proba(np.array([[
corpus.dictionary.word2idx["fish"],
corpus.dictionary.word2idx["sees"],
After Change
words = [corpus.dictionary.idx2word[n] for n in range(10)]
print(words)
p = learner.predict_proba(np.array([[
corpus.dictionary.word2idx["fish"],
corpus.dictionary.word2idx["sees"],
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: dnouri/skorch
Commit Name: a7cd7a15a9baf741f2b4fcd32f3d8055827889b5
Time: 2017-08-08
Author: marian.tietz@ottogroup.com
File Name: examples/word_language_model/predict.py
Class Name:
Method Name:
Project Name: BindsNET/bindsnet
Commit Name: 25fbc56b910b394c02f0c2673630f602899ddc56
Time: 2018-05-25
Author: djsaunde@cs.umass.edu
File Name: examples/mnist/conv_mnist.py
Class Name:
Method Name:
Project Name: mozilla/TTS
Commit Name: e02fc51fde25ad2a66f630f79a5d6b8a8c9fedc7
Time: 2019-08-23
Author: egolge@mozilla.com
File Name: server/synthesizer.py
Class Name: Synthesizer
Method Name: tts