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
else:
torch.cuda.manual_seed(args.seed)
if args.temperature < 1e-3:
parser.error("--temperature has to be greater or equal 1e-3")
with open(args.checkpoint, "rb") as f:
model = torch.load(f)
if args.cuda:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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: AlexsLemonade/refinebio
Commit Name: 70377c624fdc514cd5897985c67c922cba613c1d
Time: 2018-08-27
Author: kurt.wheeler91@gmail.com
File Name: foreman/data_refinery_foreman/surveyor/transcriptome_index.py
Class Name: TranscriptomeIndexSurveyor
Method Name: discover_species