2bf8adc6913f17dfe8324b1b1a63df4d2b92b9a1,scripts/language_model/large_word_language_model.py,,test,#Any#Any#Any#,268
Before Change
avg = (total_L / ntotal).asscalar()
if nbatch % args.log_interval == 0:
print("Evaluation batch %d: test loss %.2f, test ppl %.2f"
%(nbatch, avg, math.exp(avg)) )
if max_nbatch_eval and nbatch > max_nbatch_eval:
print("Quit evaluation early at batch %d"%nbatch)
break
After Change
nbatch += 1
avg = total_L / ntotal
if nbatch % args.log_interval == 0:
avg_scalar = float(avg.asscalar() )
ppl = math.exp(avg_scalar)
throughput = batch_size*args.log_interval/(time.time()-start_time)
print("Evaluation batch %d: test loss %.2f, test ppl %.2f, "
"throughput = %.2f samples/s"%(nbatch, avg_scalar, ppl, throughput))
start_time = time.time()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: dmlc/gluon-nlp
Commit Name: 2bf8adc6913f17dfe8324b1b1a63df4d2b92b9a1
Time: 2018-08-13
Author: linhaibin.eric@gmail.com
File Name: scripts/language_model/large_word_language_model.py
Class Name:
Method Name: test
Project Name: PyMVPA/PyMVPA
Commit Name: eb4950c06f23adcbd73cb635fba86bac56276deb
Time: 2014-02-26
Author: michael.hanke@gmail.com
File Name: mvpa2/tests/test_rsa.py
Class Name:
Method Name: test_DissimilarityConsistencyMeasure
Project Name: chainer/chainercv
Commit Name: 1d8df858d4fcaf22de3de7babbab0d9b9d0858ae
Time: 2018-10-11
Author: Hakuyume@users.noreply.github.com
File Name: chainercv/links/model/ssd/multibox_loss.py
Class Name:
Method Name: multibox_loss