301b0cbf78e3de174a50fff682e142c985b3ae88,OpenNMT/train.py,,main,#,225

Before Change


def main():

    checkpoint = {}
    assert opt.train_from is None, "FIXME: Load from checkpoint"

    print("Loading data from "%s"" % opt.data)

    dataset = torch.load(opt.data)

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()
    else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 301b0cbf78e3de174a50fff682e142c985b3ae88
Time: 2017-02-22
Author: alerer@fb.com
File Name: OpenNMT/train.py
Class Name:
Method Name: main


Project Name: asappresearch/sru
Commit Name: 2a15843223ac09c1331b1ca444da179ccab735d9
Time: 2020-10-07
Author: hp@asapp.com
File Name: test/test_regression_2.py
Class Name:
Method Name: run


Project Name: asappresearch/sru
Commit Name: 6629a7801184d9ff646c266154a09e94d643c39d
Time: 2020-10-11
Author: hp@asapp.com
File Name: test/test_regression_2.py
Class Name:
Method Name: run