d5a75ba09ae0595ca284fd806475eb8d3f771387,word_language_model/generate.py,,,#,18
Before Change
hidden = model.initHidden(1)
input = torch.LongTensor(1,1).fill_(int(math.floor(torch.rand(1)[0] * ntokens)))
if args.cuda:
input = input.cuda()
After Change
corpus = data.Corpus(args.data)
ntokens = len(corpus.dictionary)
hidden = model.init_hidden(1)
input = Variable(torch.rand(1, 1).mul(ntokens).long(), volatile=True)
if args.cuda:
input.data = input.data.cuda()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: OpenNMT/OpenNMT-py
Commit Name: d5a75ba09ae0595ca284fd806475eb8d3f771387
Time: 2017-01-17
Author: adam.paszke@gmail.com
File Name: word_language_model/generate.py
Class Name:
Method Name:
Project Name: jwyang/faster-rcnn.pytorch
Commit Name: 6def46044be4f04b45704562396b39108ec12bf0
Time: 2017-08-30
Author: echosenm@gmail.com
File Name: lib/model/rpn/proposal_target_layer_4.py
Class Name: _ProposalTargetLayer
Method Name: _sample_rois_pytorch