a258cacef0569253614063bfb611d7c2b22f19bd,eval_ensemble.py,,,#,22
Before Change
tmp = models.setup(model_infos[i]["opt"])
tmp.load_state_dict(torch.load(model_paths[i]))
tmp.cuda()
tmp.eval()
_models.append(tmp)
model = AttEnsemble(_models)
model.seq_length = opt.seq_length
After Change
_models.append(tmp)
if opt.weights:
opt.weights = [float(_) for _ in opt.weights]
model = AttEnsemble(_models, weights=opt.weights)
model.seq_length = opt.seq_length
model.cuda()
model.eval()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: ruotianluo/self-critical.pytorch
Commit Name: a258cacef0569253614063bfb611d7c2b22f19bd
Time: 2019-02-14
Author: rluo@ttic.edu
File Name: eval_ensemble.py
Class Name:
Method Name:
Project Name: brian-team/brian2
Commit Name: c84200e9bb97b39a73778e5b32df3b85cb2614c9
Time: 2013-06-25
Author: dan.goodman@ens.fr
File Name: brian2/tests/test_syntax_translation.py
Class Name:
Method Name: parse_expressions