301b0cbf78e3de174a50fff682e142c985b3ae88,OpenNMT/train.py,,main,#,225
Before Change
print("Building model...")
if "model" in checkpoint :
model = checkpoint["model"]
else:
encoder = onmt.Models.Encoder(opt, dicts["src"])
After Change
start_decay_at=opt.start_decay_at
)
else:
checkpoint = torch.load(opt.train_from)
model = checkpoint["model"]
optim = checkpoint["optim"]
opt.start_epoch = checkpoint["epoch"]
if opt.cuda:
model.cuda()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: pytorch/examples
Commit Name: 301b0cbf78e3de174a50fff682e142c985b3ae88
Time: 2017-02-22
Author: alerer@fb.com
File Name: OpenNMT/train.py
Class Name:
Method Name: main
Project Name: sony/nnabla
Commit Name: 699ce9a0d6e19852f5d6171f86265b718bc860f8
Time: 2021-03-01
Author: woody.li@sony.com
File Name: python/src/nnabla/utils/nnp_graph.py
Class Name: NnpLoader
Method Name: __init__