012cf6ba1cc018330ffcf90626a8227c7180db08,train_gl.py,,train_epoch,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,340
Before Change
if log_interval and not (i + 1) % log_interval:
speed = batch_size * log_interval / (time.time() - btic)
btic = time.time()
_, top1 = acc_top1_train.get()
err_top1_train = 1.0 - top1
logging.info("Epoch[{}] Batch [{}]\tSpeed: {:.2f} samples/sec\ttop1-err={:.4f}\tlr={:.5f}".format(
epoch + 1, i, speed, err_top1_train, trainer.learning_rate))
if (batch_size_scale != 1) and (batch_size_extend_count > 0):
trainer.step(batch_size * batch_size_extend_count)
for p in net.collect_params().values():
p.zero_grad()
throughput = int(batch_size * (i + 1) / (time.time() - tic))
logging.info("[Epoch {}] speed: {:.2f} samples/sec\ttime cost: {:.2f} sec".format(
epoch + 1, throughput, time.time() - tic))
train_loss /= (i + 1)
_, top1 = acc_top1_train.get()
err_top1_train = 1.0 - top1
logging.info("[Epoch {}] training: err-top1={:.4f}\tloss={:.4f}".format(
epoch + 1, err_top1_train, train_loss))
After Change
if log_interval and not (i + 1) % log_interval:
speed = batch_size * log_interval / (time.time() - btic)
btic = time.time()
train_accuracy_msg = report_accuracy(metric=train_metric)
logging.info("Epoch[{}] Batch [{}]\tSpeed: {:.2f} samples/sec\t{}\tlr={:.5f}".format(
epoch + 1, i, speed, train_accuracy_msg, trainer.learning_rate))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: osmr/imgclsmob
Commit Name: 012cf6ba1cc018330ffcf90626a8227c7180db08
Time: 2019-05-04
Author: osemery@gmail.com
File Name: train_gl.py
Class Name:
Method Name: train_epoch
Project Name: osmr/imgclsmob
Commit Name: 012cf6ba1cc018330ffcf90626a8227c7180db08
Time: 2019-05-04
Author: osemery@gmail.com
File Name: train_gl.py
Class Name:
Method Name: train_net
Project Name: osmr/imgclsmob
Commit Name: 012cf6ba1cc018330ffcf90626a8227c7180db08
Time: 2019-05-04
Author: osemery@gmail.com
File Name: train_gl.py
Class Name:
Method Name: train_epoch
Project Name: osmr/imgclsmob
Commit Name: 991222c64a0bef68188acfe514489f0ca7921980
Time: 2019-05-04
Author: osemery@gmail.com
File Name: train_gl_cifar.py
Class Name:
Method Name: train_epoch