f6415170f7f90124e9cdb9ccd37cd867852b7657,train.py,,,#,19

Before Change


os.makedirs(args.save_path, exist_ok=True)

running_loss = 0.0
train_begin = time.time()
for epoch in range(1, model_args.num_epochs + 1):
    for i, batch in enumerate(dataloader):
        optimizer.zero_grad()

After Change


        if i % 100 == 0:
            // print current time, running average, learning rate, iteration, epoch
            print("[{}][Epoch: {:3d}][Iter: {:6d}][Loss: {:6f}][lr: {:7f}]".format(
                datetime.datetime.utcnow() - train_begin, epoch,
                    (epoch - 1) * args.iter_per_epoch + i, running_loss,
                    optimizer.param_groups[0]["lr"]))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: batra-mlp-lab/visdial-challenge-starter-pytorch
Commit Name: f6415170f7f90124e9cdb9ccd37cd867852b7657
Time: 2018-07-08
Author: karandesai281196@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: dickreuter/Poker
Commit Name: ffc69dfd3c806cab0fed63cfc99d4f213ebc395d
Time: 2016-09-20
Author: dickreuter@yahoo.com
File Name: main.py
Class Name: ThreadManager
Method Name: run


Project Name: dickreuter/Poker
Commit Name: ffc69dfd3c806cab0fed63cfc99d4f213ebc395d
Time: 2016-09-20
Author: dickreuter@yahoo.com
File Name: main.py
Class Name: TableScreenBased
Method Name: get_new_hand


Project Name: batra-mlp-lab/visdial-challenge-starter-pytorch
Commit Name: 42fc102b56aadde323fa695d35e109c5bfb13e7c
Time: 2018-07-08
Author: karandesai281196@gmail.com
File Name: train.py
Class Name:
Method Name: