b65560304dc61e63fa45e5a26fee930661c6e998,ssd/engine/trainer.py,,do_train,#Any#Any#Any#Any#Any#Any#Any#Any#Any#,48
Before Change
end = time.time()
if iteration % args.log_step == 0:
eta_seconds = int((trained_time / iteration) * (max_iter - iteration))
log_str = [
"iter: {:06d}, lr: {:.5f}, cost: {:.2f}s, eta: {}".format(iteration,
optimizer.param_groups[0]["lr"],
time.time() - tic, str(datetime.timedelta(seconds=eta_seconds))),
"total_loss: {:.3f}".format(losses_reduced.item())
]
for loss_name, loss_item in loss_dict_reduced.items():
log_str.append("{}: {:.3f}".format(loss_name, loss_item.item()))
log_str = ", ".join(log_str)
// TODO: use MetricLogger to log
After Change
batch_time = time.time() - end
end = time.time()
meters.update(time=batch_time)
if iteration % args.log_step == 0:
eta_seconds = meters.time.global_avg * (max_iter - iteration)
eta_string = str(datetime.timedelta(seconds=int(eta_seconds)))
logger.info(
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 3
Instances
Project Name: lufficc/SSD
Commit Name: b65560304dc61e63fa45e5a26fee930661c6e998
Time: 2019-06-23
Author: luffy.lcc@gmail.com
File Name: ssd/engine/trainer.py
Class Name:
Method Name: do_train
Project Name: Microsoft/nni
Commit Name: 9d468d2c742491af2d2f506c648ddc95ffea6a64
Time: 2019-10-20
Author: lanny@mail.hfut.edu.cn
File Name: src/sdk/pynni/nni/compression/torch/builtin_pruners.py
Class Name: SensitivityPruner
Method Name: calc_mask
Project Name: osmr/imgclsmob
Commit Name: 6e6f6c993efc6345f0582c32d96c778055f165cb
Time: 2019-05-10
Author: osemery@gmail.com
File Name: train_pt.py
Class Name:
Method Name: train_epoch
Project Name: osmr/imgclsmob
Commit Name: f5c40b06d1141f12e8329b93285f4bfc827fc328
Time: 2019-03-27
Author: osemery@gmail.com
File Name: pytorch/seg_utils.py
Class Name:
Method Name: validate1
Project Name: facebookresearch/ParlAI
Commit Name: 72c304fa7cac16ed19d8bc75a017f17c8073dd2f
Time: 2020-02-13
Author: roller@fb.com
File Name: parlai/core/torch_generator_agent.py
Class Name: TorchGeneratorAgent
Method Name: train_step