2d47f3f4a1ca342baf92c20a3e1d11c9eb80b3d1,word_language_model/main.py,,,#,157
Before Change
total_loss = 0
start_time = time.time()
val_loss = evaluate(model, valid, criterion)
print(
"| end of epoch {:3d} | ms/batch {:5.2f} | valid loss {:5.2f} | valid ppl {:8.2f}".format(
epoch, (time.time() - epoch_start_time) * 1000 / train.size(0), val_loss, math.exp(val_loss)
After Change
loss = 0
if i % reportinterval == 0:
cur_loss = total_loss[0] / reportinterval
elapsed = time.time() - start_time
print(
("| epoch {:3d} | {:5d}/{:5d} batches | lr {:02.6f} | ms/batch {:5.2f} | "
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: OpenNMT/OpenNMT-py
Commit Name: 2d47f3f4a1ca342baf92c20a3e1d11c9eb80b3d1
Time: 2016-10-16
Author: alerer@fb.com
File Name: word_language_model/main.py
Class Name:
Method Name:
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: f8a5a458ff6a35e91ae9d705160d73cdcc8adf97
Time: 2017-05-31
Author: valentina.zantedeschi@ibm.com
File Name: test.py
Class Name:
Method Name: