cf1c64a5f7cffe7a362cc772752f8f226fb04f22,train.py,,validate,#Any#Any#Any#Any#Any#Any#,204

Before Change


    if num_updates is not None:
        stats["num_updates"] = num_updates

    if hasattr(save_checkpoint, "best"):
        stats["best"] = min(save_checkpoint.best, stats["valid_loss"])

    progress.print(stats)

    return stats["valid_loss"]

After Change


        log_output = trainer.valid_step(sample)

        for k, v in log_output.items():
            if k in ["loss", "nll_loss", "sample_size"]:
                continue
            extra_meters[k].update(v)

    // log validation stats
    stats = get_valid_stats(trainer)
    for k, meter in extra_meters.items():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pytorch/fairseq
Commit Name: cf1c64a5f7cffe7a362cc772752f8f226fb04f22
Time: 2018-06-15
Author: myleott@fb.com
File Name: train.py
Class Name:
Method Name: validate


Project Name: matplotlib/matplotlib
Commit Name: 34b8eb46e5de6b760bc131e461755042716e259d
Time: 2018-02-07
Author: story645@gmail.com
File Name: lib/matplotlib/category.py
Class Name: StrCategoryConverter
Method Name: convert