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))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

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: NifTK/NiftyNet
Commit Name: ab26c016f80b4b4de722e7b05b07153f48e77ef9
Time: 2018-11-20
Author: oeslle.lucena@gmail.com
File Name: demos/PyTorchNiftyNet/libs/dataset_niftynet.py
Class Name: DatasetNiftySampler
Method Name: __getitem__


Project Name: DT42/BerryNet
Commit Name: 1a4afd3eb200e41706b67497bdc94261263147ee
Time: 2018-02-19
Author: bofu@dt42.io
File Name: berrynet/engine/movidius.py
Class Name:
Method Name: process_inceptionv3_output


Project Name: NifTK/NiftyNet
Commit Name: 9db50ab9ed6bf6b4e462c84e2c38fedd36e7467a
Time: 2017-11-08
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/io/image_sets_partitioner.py
Class Name: ImageSetsPartitioner
Method Name: randomly_split_dataset


Project Name: dmlc/gluon-cv
Commit Name: cccec0b79f0387affcd4e61e12b9eba254685363
Time: 2018-05-24
Author: cheungchih@gmail.com
File Name: scripts/detection/ssd/train_ssd.py
Class Name:
Method Name: train


Project Name: ray-project/ray
Commit Name: 57544b1ff9f97d4da9f64d25c8ea5a3d8d247ffc
Time: 2020-05-11
Author: sven@anyscale.io
File Name: rllib/examples/eager_execution.py
Class Name: EagerModel
Method Name: forward